Register our annotations, relative to this file.

@return static
16833
public static function basicDiscovery(): self
    {
        // @todo Check Drupal core for other tags to ignore?
        AnnotationReader::addGlobalIgnoredName('class');
        AnnotationRegistry::registerFile(__DIR__.'/Annotation/CustomField.php');
        $discovery = new CustomFieldDiscovery('\\Lullabot\\Mpx', 'src', __DIR__.'/../..', new AnnotationReader());

        return new static($discovery);
    }
767319
protected function registerPaths()
    {
        $config = $this->config;

        // Priority (1)
        $this->addPath(
            realpath($config->get('path.templates')),
            PriorityQueue::LOW - 20
        );

        // Priority (2)
        $this->addPath(
            realpath(__DIR__ . '/../Resources/Templates'),
            PriorityQueue::LOW - 30
        );

        return $this;
    }
217341
public function registerComponents()
    {
        // Check objects
        if (empty($this->paths)) {
            return;
        }

        // Work on file paths
        foreach ($this->paths as $action => $actionPaths) {
            // Work on paths
            $actionPaths = !is_array($actionPaths) ? [$actionPaths] : $actionPaths;

            // Work on file name
            $filepath = OL_ZEUS_CACHE.$this->classname.'-'.$action.'-components.php';

            // Check cache file
            if (!file_exists($filepath)) {
                // Store all in cache file
                ClassMapGenerator::dump($actionPaths, $filepath);
            }

            $classmap = include_once $filepath;

            // Instanciate new ClassLoader to load and register components
            $loader = new MapClassLoader($classmap);
            $loader->register();

            // Get current hook
            $current = current_filter();
            $function = in_array($action, ['widgets_init']) ? 'registerWidgets' : 'registerObjects';

            // Register post type
            if ($action === $current) {
                // Already inside an `init` action
                $this->$function($classmap);
            } else {
                // Outside an `init` action
                add_action($action, function () use ($classmap, $function) {
                    $this->$function($classmap);
                });
            }
        }
    }
204133
public static function register() {
		ini_set('display_errors', 0);
		ini_set('display_startup_errors', 0);
		error_reporting(-1);

		static::$reservedMemory = str_repeat('a', 10240);
		static::$errorAtStart = error_get_last();

		$errorHandler = new static();
		set_error_handler([$errorHandler, 'phpErrorHandler']);
		set_exception_handler([$errorHandler, 'exceptionHandler']);

		return $errorHandler;
	}
17024
public function register()
    {
        Model::clearBootedModels();

        $this->registerEloquentFactory();

        $this->registerQueueableEntityResolver();

        // The connection factory is used to create the actual connection instances on
        // the database. We will inject the factory into the manager so that it may
        // make the connections while they are actually needed and not of before.
        $this->app->singleton('db.factory', function ($app) {
            return new ConnectionFactory($app);
        });

        // The database manager is used to resolve various connections, since multiple
        // connections might be managed. It also implements the connection resolver
        // interface which may be used by other components requiring connections.
        $this->app->singleton('db', function ($app) {
            return new DatabaseManager($app, $app['db.factory']);
        });

        $this->app->bind('db.connection', function ($app) {
            return $app['db']->connection();
        });
    }
84938
public static function register()
    {
        $filtername = self::FILTERNAME.'.*';
        if (!in_array($filtername, stream_get_filters(), true)) {
            stream_filter_register($filtername, self::class);
        }
    }
310494
public function register()
    {
        $url = $this->_di->getService( "url" );

        $base_path = $url->getRootPath();

        spl_autoload_register( function($file_name) use ($base_path) {
            foreach ( $this->registered_directories as $dir )
            {
                $file_path = $base_path . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $file_name . ".php";
                
                if ( file_exists($file_path) )
                {
                    return include($file_path);
                }
            }
        } );
    }
883520
protected function registerLoader()
    {
        $this->app->singleton('translation.loader', function(Application $app) {
            /**
             * @var  \Illuminate\Config\Repository      $config
             * @var  \Illuminate\Filesystem\Filesystem  $files
             */
            $config  = $app['config'];
            $files   = $app['files'];
            $vendor  = $config->get('laravel-lang.vendor', '');
            $locales = $config->get('laravel-lang.locales', []);

            return new FileLoader(
                $files, $app->langPath(), $vendor, $locales
            );
        });
    }
619442
public function register()
    {
        foreach ($this->modules as $module) {
            if ($aggregator = $module->getAttribute('aggregator')) {
                $this->container->register($aggregator);
            }
        }

        return $this;
    }
1009300
protected function registerFacadesAliases(): void
    {
        $loader = AliasLoader::getInstance();

        foreach ((array) $this->facades as $facade => $aliases) {
            foreach ((array) $aliases as $alias) {
                $loader->alias($alias, $facade);
            }
        }
    }
501755
public function registerClassLoader() : void
    {
        if ($this->root === null) {
            return;
        }

        $path = sprintf('%s/%s/autoload.php', $this->root, $this->getVendorDirectory());

        if (!is_file($path)) {
            return;
        }

        require $path;
    }
101253
protected function registerReader()
    {
        // Give a Cached Reader when our
        // reader class needs
        // a ReaderContract.
        $this->app->when(AnnotationsReader::class)
                  ->needs(Reader::class)
                  ->give(function () {
                      return $this->createAndReturnCachedReader();
                  });
    }
36509
public function register()
    {
        if (!$this->isRegistered) {
            $this->system->setErrorHandler([$this, self::ERROR_HANDLER]);
            $this->system->setExceptionHandler([$this, self::EXCEPTION_HANDLER]);
            $this->system->registerShutdownFunction([$this, self::SHUTDOWN_HANDLER]);

            $this->isRegistered = true;
        }

        return $this;
    }
1023342
public function register()
    {
        $tokens = array();
        foreach ($this->newOperators as $token => $versions) {
            if (\defined($token)) {
                $tokens[] = constant($token);
            } elseif (isset($this->newOperatorsPHPCSCompat[$token])) {
                $tokens[] = $this->newOperatorsPHPCSCompat[$token];
            }
        }
        return $tokens;
    }
231834
public static function __static()
    {
        self::$DOCBLOCK                     = new Docblock();
        self::$ANNOTATION                   = new InAnnotation();
        self::$ANNOTATION_NAME              = new AnnotationName();
        self::$ANNOTATION_TYPE              = new AnnotationType();
        self::$ARGUMENT                     = new AnnotationForArgument();
        self::$PARAM_NAME                   = new ParamName();
        self::$PARAM_VALUE                  = new ParamValue();
        self::$PARAM_VALUE_IN_SINGLE_QUOTES = new EnclosedParamValue();
        self::$PARAM_VALUE_IN_DOUBLE_QUOTES = new EnclosedParamValue();
        self::$DOCBLOCK->init();
        self::$ANNOTATION->init();
        self::$ANNOTATION_NAME->init();
        self::$ANNOTATION_TYPE->init();
        self::$ARGUMENT->init();
        self::$PARAM_NAME->init();
        self::$PARAM_VALUE->init();
        self::$PARAM_VALUE_IN_SINGLE_QUOTES->init("'");
        self::$PARAM_VALUE_IN_DOUBLE_QUOTES->init('"');
    }
481275
protected function registerRouteScanner()
    {
        $this->app->singleton('annotations.route.scanner', function ($app) {
            $scanner = new RouteScanner([]);

            $scanner->addAnnotationNamespace(
              'Collective\Annotations\Routing\Annotations\Annotations',
              __DIR__.'/Routing/Annotations/Annotations'
            );

            return $scanner;
        });
    }
970801
public function register()
    {
        $this->app['aura/html:helper'] = $this->app->share(
            function ($app) {
                $app;
                $factory = new \Aura\Html\HelperLocatorFactory;
                return $factory->newInstance();
            }
        );

        $this->app['aura/html:escaper'] = $this->app->share(
            function ($app) {
                $app;
                $factory = new \Aura\Html\EscaperFactory();
                return $factory->newInstance();
            }
        );

        $this->app['jnjxp/meta:helper'] = $this->app->share(
            function ($app) {
                $factory = new MetaHelperFactory(
                    $app->make('aura/html:helper'),
                    $app->make('aura/html:escaper')
                );
                return $factory->newInstance();
            }
        );

        $this->app->booting(
            function () {
                $loader = \Illuminate\Foundation\AliasLoader::getInstance();
                $loader->alias('AuraHtml', 'Jnjxp\Meta\Facades\AuraHtmlHelper');
                $loader->alias('Meta', 'Jnjxp\Meta\Facades\MetaHelper');
            }
        );
    }