AnnotationRegistry
in package
Table of Contents
- $autoloadNamespaces : array<string|int, array<string|int, string>>|array<string|int, string>|array<string|int, null>
- A map of namespaces to use for autoloading purposes based on a PSR-0 convention.
- $failedToAutoload : array<string|int, null>
- An array of classes which cannot be found
- $loaders : array<string|int, callable>
- A map of autoloader callables.
- $registerFileUsed : bool
- Whenever registerFile() was used. Disables use of standard autoloader.
- 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().
- registerUniqueLoader() : void
- Registers an autoloading callable for annotations, if it is not already registered
- reset() : void
Properties
$autoloadNamespaces
A map of namespaces to use for autoloading purposes based on a PSR-0 convention.
private
static array<string|int, array<string|int, string>>|array<string|int, string>|array<string|int, null>
$autoloadNamespaces
= []
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.
$failedToAutoload
An array of classes which cannot be found
private
static array<string|int, null>
$failedToAutoload
= []
$loaders
A map of autoloader callables.
private
static array<string|int, callable>
$loaders
= []
$registerFileUsed
Whenever registerFile() was used. Disables use of standard autoloader.
private
static bool
$registerFileUsed
= false
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[, mixed $dirs = null ]) : void
Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
Parameters
- $namespace : string
- $dirs : mixed = null
Tags
Return values
void —registerAutoloadNamespaces()
Registers multiple namespaces.
public
static registerAutoloadNamespaces(array<string|int, array<string|int, string>>|array<string|int, string>|array<string|int, null> $namespaces) : void
Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
Parameters
- $namespaces : array<string|int, array<string|int, string>>|array<string|int, string>|array<string|int, null>
-
indexed by namespace name
Tags
Return values
void —registerFile()
Registers file.
public
static registerFile(string $file) : void
Parameters
- $file : string
Tags
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 —registerUniqueLoader()
Registers an autoloading callable for annotations, if it is not already registered
public
static registerUniqueLoader(callable $callable) : void
Parameters
- $callable : callable
Tags
Return values
void —reset()
public
static reset() : void