This commit is contained in:
shibafu
2019-01-15 00:05:01 +09:00
parent a2f797cbbe
commit faf0755ebd
44 changed files with 87 additions and 68 deletions

View File

@@ -21,11 +21,12 @@ class MetadataResolver implements Resolver
{
foreach ($this->rules as $pattern => $class) {
if (preg_match($pattern, $url) === 1) {
$resolver = new $class;
$resolver = new $class();
return $resolver->resolve($url);
}
}
throw new \UnexpectedValueException('URL not matched.');
}
}
}