public static function AnnotationRegistry::registerLoader

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:

Throws

\InvalidArgumentException

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php, line 97

Class

AnnotationRegistry
AnnotationRegistry

Namespace

Doctrine\Common\Annotations

Code

public static function registerLoader($callable) {
  if (!is_callable($callable)) {
    throw new \InvalidArgumentException("A callable is expected in AnnotationRegistry::registerLoader().");
  }
  self::$loaders[] = $callable;
}