public static function AnnotationRegistry::registerLoader in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader()
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:
Return value
void
Throws
\InvalidArgumentException
2 calls to AnnotationRegistry::registerLoader()
- AnnotatedClassDiscovery::getDefinitions in lib/
Drupal/ Component/ Annotation/ Plugin/ Discovery/ AnnotatedClassDiscovery.php - Gets the definition of all plugins for this type.
- AnnotatedClassDiscovery::getDefinitions in modules/
providers/ service_container_annotation_discovery/ src/ Plugin/ Discovery/ AnnotatedClassDiscovery.php - Gets the definition of all plugins for this type.
File
- modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationRegistry.php, line 108
Class
- AnnotationRegistry
- AnnotationRegistry.
Namespace
Doctrine\Common\AnnotationsCode
public static function registerLoader($callable) {
if (!is_callable($callable)) {
throw new \InvalidArgumentException("A callable is expected in AnnotationRegistry::registerLoader().");
}
self::$loaders[] = $callable;
}