AnnotationDirectoryLoader
extends AnnotationFileLoader
in package
AnnotationDirectoryLoader loads routing information from annotations set on PHP classes and methods.
Tags
Table of Contents
Properties
- $env : mixed
- $loader : mixed
- $loading : mixed
- $locator : mixed
- $resolver : mixed
- $currentDir : string|null
Methods
- __construct() : mixed
- getLocator() : FileLocatorInterface
- Returns the file locator used by this loader.
- getResolver() : LoaderResolverInterface
- Gets the loader resolver.
- import() : mixed
- Imports a resource.
- load() : RouteCollection|null
- Loads from annotations from a file.
- resolve() : LoaderInterface
- Finds a loader able to load an imported resource.
- setCurrentDir() : mixed
- Sets the current directory.
- setResolver() : mixed
- Sets the loader resolver.
- supports() : bool
- {@inheritdoc}
- findClass() : string|false
- Returns the full class name for the first class in the file.
- doImport() : mixed
Properties
$env
protected
mixed
$env
$loader
protected
mixed
$loader
$loading
protected
static mixed
$loading
= []
$locator
protected
mixed
$locator
$resolver
protected
mixed
$resolver
$currentDir
private
string|null
$currentDir
= null
Methods
__construct()
public
__construct([string $env = null ]) : mixed
Parameters
- $env : string = null
getLocator()
Returns the file locator used by this loader.
public
getLocator() : FileLocatorInterface
Return values
FileLocatorInterfacegetResolver()
Gets the loader resolver.
public
getResolver() : LoaderResolverInterface
Return values
LoaderResolverInterfaceimport()
Imports a resource.
public
import(mixed $resource[, string $type = null ]) : mixed
Parameters
- $resource : mixed
- $type : string = null
load()
Loads from annotations from a file.
public
load(mixed $path[, string $type = null ]) : RouteCollection|null
Parameters
- $path : mixed
- $type : string = null
Tags
Return values
RouteCollection|nullresolve()
Finds a loader able to load an imported resource.
public
resolve(mixed $resource[, string $type = null ]) : LoaderInterface
Parameters
- $resource : mixed
- $type : string = null
Tags
Return values
LoaderInterfacesetCurrentDir()
Sets the current directory.
public
setCurrentDir(string $dir) : mixed
Parameters
- $dir : string
setResolver()
Sets the loader resolver.
public
setResolver(LoaderResolverInterface $resolver) : mixed
Parameters
- $resolver : LoaderResolverInterface
supports()
{@inheritdoc}
public
supports(mixed $resource[, string $type = null ]) : bool
Parameters
- $resource : mixed
- $type : string = null
Return values
boolfindClass()
Returns the full class name for the first class in the file.
protected
findClass(string $file) : string|false
Parameters
- $file : string
Return values
string|falsedoImport()
private
doImport(mixed $resource[, string $type = null ][, bool $ignoreErrors = false ][, string $sourceResource = null ]) : mixed
Parameters
- $resource : mixed
- $type : string = null
- $ignoreErrors : bool = false
- $sourceResource : string = null