Registers an autoloader instance SPL with highest priority for loading classes of the app.

@param object $app The app configuration object

@author Benjamin Carl <opensource@clickalicious.de>
325895
protected function registerAutoloader($app)
    {
        // now configure a new autoloader spl configuration
        $autoloaderApp = new Doozr_Loader_Autoloader_Spl_Config();
        $autoloaderApp
            ->_namespace($app->namespace)
            ->namespaceSeparator('_')
            ->addExtension('php')
            ->path(substr($app->path, 0, -1))
            ->description('Autoloader for App classes with namespace: "'.$app->namespace.'"')
            ->priority(0);

        Doozr_Loader_Autoloader_Spl_Facade::attach([$autoloaderApp]);
    }
312065
public function register(Container $app)
    {
        $routerContainer = new RouterContainer();
        $app[Map::class] = $routerContainer->getMap();
        $app[RuleIterator::class] = $routerContainer->getRuleIterator();
    }
596769
protected static function registerWatchers($app)
    {
        foreach (config('telescope.watchers') as $key => $watcher) {
            if (is_string($key) && $watcher === false) {
                continue;
            }

            if (is_array($watcher) && ! ($watcher['enabled'] ?? true)) {
                continue;
            }

            $watcher = $app->make(is_string($key) ? $key : $watcher, [
                'options' => is_array($watcher) ? $watcher : [],
            ]);

            static::$watchers[] = get_class($watcher);

            $watcher->register($app);
        }
    }
776226
public function bootstrap(Container $app) {
	    $extensions = $this->manager->getAvailableExtensions()->filterByActivated();

        $this->dispatcher->registerCollection($extensions);
        $this->dispatcher->boot();
	}
434727
public function register(Container $app)
    {
        $app['singular.packs'] = function () use ($app) {
            return new Container();
        };

        $app['singular.service_map'] = function () use ($app) {
            return new Container();
        };

        $app['singular.config_loader'] = function () use ($app) {
            return new ConfigLoader($app);
        };

        $app['singular.service_locator'] = function () use ($app) {
            return new ServiceLocator(
                $app['singular.packs'],
                $app['singular.service_map'],
                $app['singular.resolver']
            );
        };

        $app['singular.service_resolver'] = function () use ($app) {
            return new ServiceResolver($app);
        };

        $app['singular.resolver'] = function () use ($app) {
            return new Resolver(
                $app['singular.controller_resolver'],
                $app['singular.service_resolver']
            );
        };

        $app['singular.controller_locator'] = function () use ($app) {
            return new ControllerLocator(
                $app['singular.resolver'],
                $app['singular.packs'],
                $app['singular.service_map']
            );
        };

        $app['singular.controller_resolver'] = function () use ($app) {
            return new ControllerResolver($app);
        };
    }
923484
public function register(Container $app)
    {
        $app[ResponseInterface::class]
            = $app->factory(Response::class);

        $app[ServerRequestInterface::class] = function () use ($app) {
            // Return changed request if available
            if (isset($app->request)) {
                return $app->request;
            }
            return ServerRequestFactory::fromGlobals();
        };
    }
1072462
public function register(App $app)
    {
        if (isset($app["guzzle.service"]) === false) {
            $app["guzzleClient.service"] = function() {
                return new \GuzzleHttp\Client;
            };
        }

        /*
         * This is only a temporary service definition to satisfy the install component
         * command and to load the service provider into it through the new params
         * as services method.
         *
         * @todo: remove when the component commands are refactored
         */
        $app["serviceProvider.service"] = function(App $app) {
            return $app;
        };

        $app["slaxerCommands"] = array_merge(
            $app["slaxerCommands"] ?? [],
            [
                \SlaxWeb\Bootstrap\Commands\Component\InstallCommand::class => [
                    "serviceProvider.service",
                    "guzzleClient.service"
                ]
            ]
        );
    }
1309798
public function register($placement = 'prepend')
	{
		$prepend = ($placement === 'append') ? false : true;

		spl_autoload_register(array($this, 'resolve'), true, $prepend);
	}
1291242
public function register(Application $app)
    {
        $app["loadController.service"] = $app->protect(
            function (string $name) use ($app) {
                $args = func_get_args();
                $cacheName = "loadController.service-{$name}";
                if (isset($app[$cacheName])) {
                    return $app[$cacheName];
                }

                $config = $app["config.service"];
                $class = rtrim($config["app.controllerNamespace"], "\\")
                    . "\\"
                    . str_replace("/", "\\", $name);
                $app[$cacheName] = new $class($app);

                if (method_exists($app[$cacheName], "init")) {
                    array_shift($args);
                    $app[$cacheName]->init(...$args);
                }

                return $app[$cacheName];
            }
        );
    }
1261623
public function boot (Application $app) {
        if (isset($app[self::NS . ".default_args"]) && is_array($app[self::NS . ".default_args"])) {
            $this -> getPreserialiser($app) -> setDefaultArgs($app[self::NS . ".default_args"]);
        } else {
        }
    }
972075
public function register(Application $App) {
        $App->addCommand(new \YourApp\Command\Foo());
        $App->addCommand(new \YourApp\Command\Bar());
        $App->addCommand(new \YourApp\Command\Baz());
    }
52430
protected function registerMapperInitializer(Application $app)
    {
        $initializer = function ($mapper, $app) {
            $mapper->setSqlFactory(new SqlFactory);
        };

        $app->initializer('Synapse\Mapper\AbstractMapper', $initializer);
    }
284474
public function register($prepend = false)
    {
        if (!$this->isLoaded) {
            spl_autoload_register(array($this, 'loadClass'), true, $prepend);
        }
        $this->isLoaded = true;
    }
1020954
protected function registerApiHelper(Application $app)
    {
        $app->singleton(Factory::class, function ($app) {
            $request = $app['request'];
            $config = $app['config'];

            return new Factory($request, $config);
        });

        $app->alias(Factory::class, 'apihelper');
    }
393725
public function register($app)
    {
        if (! $this->cache->get('telescope:dump-watcher')) {
            return;
        }

        VarDumper::setHandler(function ($var) {
            $this->recordDump((new HtmlDumper)->dump(
                (new VarCloner)->cloneVar($var), true
            ));
        });
    }
433368
public function register(Application $app)
    {
        $app['parser.example.finder'] = new Example\Finder();

        $this->addCache($app);
        $this->addAssemblers($app);
        $this->addFilters($app);
        $this->addValidators($app);
        $this->addBuilder($app);

        // I would prefer to extend it but due to a circular reference will pimple fatal
        $this->attachFiltersToManager($app['descriptor.filter'], $app);

        $app['descriptor.analyzer'] = function () {
            return new ProjectAnalyzer();
        };
    }
1188087
public function registerAutoloader()
    {
        $this->app->afterResolving(DocumentManagerRegistry::class, function (ManagerRegistryInterface $registry) {
            /** @var DocumentManager $manager */
            foreach ($registry->getManagers() as $manager) {
                Autoloader::register(
                    $manager->getConfiguration()->getProxyDir(),
                    $manager->getConfiguration()->getProxyNamespace()
                );

            }
        });
    }