AnnotationRegistry
in package
AnnotationRegistry.
Table of Contents
- $autoloadNamespaces : array<string|int, mixed>
- A map of namespaces to use for autoloading purposes based on a PSR-0 convention.
- $loaders : array<string|int, mixed>
- A map of autoloader callables.
- loadAnnotationClass() : bool
- Autoloads an annotation class silently.
- registerAutoloadNamespace() : void
- Adds a namespace with one or many directories to look for files or null for the include path.
- registerAutoloadNamespaces() : void
- Registers multiple namespaces.
- registerFile() : void
- Registers file.
- registerLoader() : void
- Registers an autoloading callable for annotations, much like spl_autoload_register().
- reset() : void
Properties
$autoloadNamespaces
A map of namespaces to use for autoloading purposes based on a PSR-0 convention.
private
static array<string|int, mixed>
$autoloadNamespaces
= array()
Contains the namespace as key and an array of directories as value. If the value is NULL the include path is used for checking for the corresponding file.
This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own.
$loaders
A map of autoloader callables.
private
static array<string|int, mixed>
$loaders
= array()
Methods
loadAnnotationClass()
Autoloads an annotation class silently.
public
static loadAnnotationClass(string $class) : bool
Parameters
- $class : string
Return values
bool —registerAutoloadNamespace()
Adds a namespace with one or many directories to look for files or null for the include path.
public
static registerAutoloadNamespace(string $namespace[, string|array<string|int, mixed>|null $dirs = null ]) : void
Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
Parameters
- $namespace : string
- $dirs : string|array<string|int, mixed>|null = null
Return values
void —registerAutoloadNamespaces()
Registers multiple namespaces.
public
static registerAutoloadNamespaces(array<string|int, mixed> $namespaces) : void
Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
Parameters
- $namespaces : array<string|int, mixed>
Return values
void —registerFile()
Registers file.
public
static registerFile(string $file) : void
Parameters
- $file : string
Return values
void —registerLoader()
Registers an autoloading callable for annotations, much like spl_autoload_register().
public
static registerLoader(callable $callable) : void
NOTE: These class loaders HAVE to be silent when a class was not found! IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class.
Parameters
- $callable : callable
Tags
Return values
void —reset()
public
static reset() : void