AnnotationDirectoryLoader
extends AnnotationFileLoader
in package
AnnotationDirectoryLoader loads routing information from annotations set on PHP classes and methods.
Tags
Table of Contents
- $loader : mixed
- __construct() : mixed
- load() : RouteCollection
- Loads from annotations from a directory.
- supports() : mixed
- {@inheritdoc}
- findClass() : string|false
- Returns the full class name for the first class in the file.
Properties
$loader
protected
mixed
$loader
Methods
__construct()
public
__construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) : mixed
Parameters
- $locator : FileLocatorInterface
- $loader : AnnotationClassLoader
Tags
Return values
mixed —load()
Loads from annotations from a directory.
public
load(string $path[, string|null $type = null ]) : RouteCollection
Parameters
- $path : string
-
A directory path
- $type : string|null = null
-
The resource type
Tags
Return values
RouteCollection —A RouteCollection instance
supports()
{@inheritdoc}
public
supports(mixed $resource[, mixed $type = null ]) : mixed
Parameters
- $resource : mixed
- $type : mixed = null
Return values
mixed —findClass()
Returns the full class name for the first class in the file.
protected
findClass(string $file) : string|false
Parameters
- $file : string
-
A PHP file path
Return values
string|false —Full class name if found, false otherwise