function AttributeDirectoryLoader::supports
Overrides AttributeFileLoader::supports
File
-
vendor/
symfony/ routing/ Loader/ AttributeDirectoryLoader.php, line 64
Class
- AttributeDirectoryLoader
- AttributeDirectoryLoader loads routing information from attributes set on PHP classes and methods.
Namespace
Symfony\Component\Routing\LoaderCode
public function supports(mixed $resource, ?string $type = null) : bool {
if (!\is_string($resource)) {
return false;
}
if ('attribute' === $type) {
return true;
}
if ($type) {
return false;
}
try {
return is_dir($this->locator
->locate($resource));
} catch (\Exception) {
return false;
}
}