You are here

public function AnnotationFileLoader::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/Loader/AnnotationFileLoader.php \Symfony\Component\Routing\Loader\AnnotationFileLoader::__construct()

Constructor.

Parameters

FileLocatorInterface $locator A FileLocator instance:

AnnotationClassLoader $loader An AnnotationClassLoader instance:

Throws

\RuntimeException

File

vendor/symfony/routing/Loader/AnnotationFileLoader.php, line 37

Class

AnnotationFileLoader
AnnotationFileLoader loads routing information from annotations set on a PHP class and its methods.

Namespace

Symfony\Component\Routing\Loader

Code

public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) {
  if (!function_exists('token_get_all')) {
    throw new \RuntimeException('The Tokenizer extension is required for the routing annotation loaders.');
  }
  parent::__construct($locator);
  $this->loader = $loader;
}