class AnnotationRegistry (View source)

Methods

static 
reset()

No description

static 
registerFile(string $file) deprecated

Registers file.

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

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

static 
registerAutoloadNamespaces(array $namespaces) deprecated

Registers multiple namespaces.

static 
registerLoader(callable $callable) deprecated

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

static 
registerUniqueLoader(callable $callable) deprecated

Registers an autoloading callable for annotations, if it is not already registered

static 
loadAnnotationClass(string $class)

Autoloads an annotation class silently.

Details

static reset()

static registerFile(string $file) deprecated

deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 autoloading should be deferred to the globally registered autoloader by then. For now, use @example AnnotationRegistry::registerLoader('class_exists')

Registers file.

Parameters

string $file

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

deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 autoloading should be deferred to the globally registered autoloader by then. For now, use @example AnnotationRegistry::registerLoader('class_exists')

Adds 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) deprecated

deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 autoloading should be deferred to the globally registered autoloader by then. For now, use @example AnnotationRegistry::registerLoader('class_exists')

Registers multiple namespaces.

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

Parameters

array $namespaces indexed by namespace name

static registerLoader(callable $callable) deprecated

deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 autoloading should be deferred to the globally registered autoloader by then. For now, use @example AnnotationRegistry::registerLoader('class_exists')

Registers 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

static registerUniqueLoader(callable $callable) deprecated

deprecated this method is deprecated and will be removed in doctrine/annotations 2.0

Registers an autoloading callable for annotations, if it is not already registered

Parameters

callable $callable

static loadAnnotationClass(string $class)

Autoloads an annotation class silently.

Parameters

string $class