Dingo\Blueprint\Blueprint::registerAnnotationLoader PHP Method

registerAnnotationLoader() protected method

Register the annotation loader.
protected registerAnnotationLoader ( ) : void
return void
    protected function registerAnnotationLoader()
    {
        $this->reader->addNamespace('Dingo\\Blueprint\\Annotation');
        $this->reader->addNamespace('Dingo\\Blueprint\\Annotation\\Method');
        AnnotationRegistry::registerLoader(function ($class) {
            $path = __DIR__ . '/' . str_replace(['Dingo\\Blueprint\\', '\\'], ['', DIRECTORY_SEPARATOR], $class) . '.php';
            if (file_exists($path)) {
                require_once $path;
                return true;
            }
        });
    }