public function AnnotationClassLoader::supports

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php, line 165

Class

AnnotationClassLoader
AnnotationClassLoader loads routing information from a PHP class and its methods.

Namespace

Symfony\Component\Routing\Loader

Code

public function supports($resource, $type = null) {
  return is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)+$/', $resource) && (!$type || 'annotation' === $type);
}