class AnnotationRegistry (View source)

AnnotationRegistry

Methods

static 
reset()

No description

static 
registerFile(string $file)

Register file

static 
registerAutoloadNamespace(string $namespace, string|array|null $dirs = null)

Add a namespace with one or many directories to look for files or null for the include path.

static 
registerAutoloadNamespaces(array $namespaces)

Register multiple namespaces

static 
registerLoader(callable $callable)

Register an autoloading callable for annotations, much like spl_autoload_register().

static boolean
loadAnnotationClass(string $class)

Autoload an annotation class silently.

Details

static reset()

static registerFile(string $file)

Register file

Parameters

string $file

static registerAutoloadNamespace(string $namespace, string|array|null $dirs = null)

Add a namespace with one or many directories to look for files or null for the include path.

Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.

Parameters

string $namespace
string|array|null $dirs

static registerAutoloadNamespaces(array $namespaces)

Register multiple namespaces

Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.

Parameters

array $namespaces

static registerLoader(callable $callable)

Register an autoloading callable for annotations, much like spl_autoload_register().

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

Exceptions

InvalidArgumentException

static boolean loadAnnotationClass(string $class)

Autoload an annotation class silently.

Parameters

string $class

Return Value

boolean