AnnotationFileLoader
extends FileLoader
in package
AnnotationFileLoader loads routing information from annotations set on a PHP class and its methods.
Tags
Table of Contents
- $loader : mixed
- __construct() : mixed
- load() : RouteCollection|null
- Loads from annotations from a file.
- 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 file.
public
load(string $file[, string|null $type = null ]) : RouteCollection|null
Parameters
- $file : string
-
A PHP file path
- $type : string|null = null
-
The resource type
Tags
Return values
RouteCollection|null —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