Register the manager class.

@param \Illuminate\Contracts\Foundation\Application $app

@return void
766997
protected function registerManager(Application $app)
    {
        $app->singleton('cloudflareapi', function ($app) {
            $config = $app['config'];
            $factory = $app['cloudflareapi.factory'];

            return new CloudFlareAPIManager($config, $factory);
        });

        $app->alias('cloudflareapi', 'GrahamCampbell\CloudFlareAPI\CloudFlareAPIManager');
    }
1190183
public static function registerServices(Application $app)
    {
        $file = $app['wise.options']['config']['services'];

        if ('prod' !== $app['wise.options']['mode']) {
            $file .= '_' . $app['wise.options']['mode'];
        }

        $file .= '.' . $app['wise.options']['type'];

        /** @var $wise Wise */
        $wise = $app['wise'];
        $services = $wise->load($file);

        unset($services['parameters']);
        unset($services['imports']);

        foreach ($services as $name => $service) {
            if (null === $service) {
                continue;
            }

            if (!isset($service['class'])) {
                throw InvalidArgumentException::format(
                    'The service "%s" did not specify its "class".',
                    $name
                );
            }

            if (!isset($service['parameters'])) {
                $service['parameters'] = array();
            }

            $app->register(new $service['class'](), $service['parameters']);
        }
    }
830294
protected function registerManager()
    {
        $this->app->singleton('queue', function ($app) {
            // Once we have an instance of the queue manager, we will register the various
            // resolvers for the queue connectors. These connectors are responsible for
            // creating the classes that accept queue configs and instantiate queues.
            return tap(new QueueManager($app), function ($manager) {
                $this->registerConnectors($manager);
            });
        });
    }
1202187
public function register(App $app)
    {
        parent::register($app);
        $app->assets()->addAssetSearchPath(CoreUI::COREUI_ASSET_PATH);
    }
408766
public function register(Application $app)
    {
        $app['md.parser'] = $app->share(function () use ($app) {
            return new MarkdownExtended();
        });

        $app['md.finder'] = $app->share(function () use ($app) {
            $args = array('path' => ($app['md.path']) ? $app['md.path'] : null);

            return new Finder($args);
        });
    }
732893
public function register(Application $app)
    {
        $app["swagger.apiDocPath"] = "/api/api-docs";
        $app["swagger.excludePath"] = array();
        $app["swagger.prettyPrint"] = true;
        $app["swagger.cache"] = array();
        $app["swagger.basePath"] = null;
        $app["swagger.apiVersion"] = null;
        $app["swagger.swaggerVersion"] = "1.2";
        $app["swagger.resourcePrefix"] = "/";
        $app["swagger.resourceSuffix"] = "";

        $app["swagger"] = $app->share(new SwaggerService());
    }
247371
public function register(Application $app)
    {
        $app['ladybug.options'] = array(
            'theme' => 'modern',
            'expanded' => false,
            'silenced' => false,
            'array_max_nesting_level' => 9,
            'object_max_nesting_level' => 3,
        );

        $app['ladybug.dumper'] = $app->share(function () use ($app) {
            $dumper = new Dumper();
            $dumper->setOptions( $app['ladybug.options'] );

            return $dumper;
        });

        $app['ladybug'] = $app->share(function() use ($app){
            return new LadybugDataCollector( $app['ladybug.dumper'] );
        });

        $app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, $app) {
            $twig->addExtension(new LadybugExtension($app));

            return $twig;
        }));

        if( isset( $app['profiler'] ) ) {
            $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function ($loader, $app) {
                $loader->addPath($app['rswork.templates_path'], 'Rswork');
                return $loader;
            }));

            $app['rswork.templates_path'] = function () {
                return realpath(__DIR__.'/../../views');
            };

            $app['data_collector.templates'] = array_merge(
                $app['data_collector.templates'],
                array(array('ladybug', '@Rswork/collector/ladybug.html.twig'))
            );

            $app['data_collectors'] = $app->share( $app->extend( 'data_collectors', function( $collectors, $app ){
                $collectors['ladubug'] = $app->share(function( $app ){
                    return $app['ladybug'];
                });

                return $collectors;
            } ) );
        }
    }
81030
public function register(Application $app)
    {
        $app[Validator::LOGIN] = $app->share(function () use ($app) {
            return new Validator\SymfonyLoginValidator($app['validator']);
        });
        $app[Validator::REGISTRATION] = $app->share(function () use ($app) {
            return new Validator\SymfonyRegistrationValidator($app['validator']);
        });
    }
522871
public function register($app)
    {
        if (!$this->isRegistered) {
            $this->loadSystemRoutes($app['router']);

            $serviceProviderPath = $this->getServiceProviderPath();
            if (is_file($serviceProviderPath)) {
                $this->provider = $app->register($this->getNamespace().'\Providers\ModuleServiceProvider');
            }

            $this->isRegistered = true;
        }

        return $this;
    }
1053525
protected function registerBindings(Application $app)
    {
        $app->bind('telegram.bot', function ($app) {
            $manager = $app['telegram'];

            return $manager->bot();
        });

        $app->alias('telegram.bot', Api::class);
    }
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"
                ]
            ]
        );
    }
1309819
protected function registerFactory(Application $app)
    {
        $app->singleton('opensearch.factory', function ($app) {
            return new Factories\OpensearchFactory();
        });
        $app->alias('opensearch.factory', 'Orzcc\Opensearch\Factories\OpensearchFactory');
    }
368059
public function register(Application $app)
    {
        if ($this->registered) {
            throw new \RuntimeException('Can not re-register extensions.');
        }
        foreach ($this->extensions as $extension) {
            if ($extension->isEnabled() !== true) {
                continue;
            }
            $extension->getInnerExtension()->setContainer($app);
            foreach ($extension->getInnerExtension()->getServiceProviders() as $provider) {
                $app->register($provider);
            }
        }
        $this->registered = true;

        // @deprecated Deprecated since 3.0, to be removed in 4.0.
        $this->app = $app;
    }
1212872
private function registerComponents($app)
    {
        foreach ($this->getModules() as $id => $module) {
            // set an alias for all user modules
            Yii::setAlias('@'.$id, $module->getBasePath());
            // see if the module has a registerComponents method
            foreach ($module->registerComponents() as $componentId => $definition) {
                if (!$app->has($componentId)) {
                    Yii::trace('Register component ' . $componentId, __METHOD__);
                    $app->set($componentId, $definition);
                }
            }
        }
    }
223315
public function register(Application $app)
    {
        parent::register($app);
        $app['cache'] = $app->share(function ($app) {
            $config = $app['config'];
            if (! array_key_exists('cache.driver', $config)) {
                return new ArrayCache();
            }
            switch ($config['cache.driver']) {
                case 'array':
                    return new ArrayCache();
                case 'redis':
                    $cache = new RedisCache();
                    if (isset($config['cache.redis'])) {
                        $redis = new \Redis();
                        $redis->connect($config['cache.redis']['host'], $config['cache.redis']['port']);
                        $cache->setRedis($redis);
                    } else {
                        $cache->setRedis($app['redis']);
                    }
                    return $cache;
                case 'xcache':
                    return new XcacheCache();
                default:
                    throw new \RuntimeException('Unknown cache driver: '.$config['cache.driver']);
            }
        });
    }
138471
public function register(\Silex\Application $app)
    {
        parent::register($app);

        // Register voters
        $app->extend('security.voters', function($voters) {
            return array_merge($voters, $this->voters);
        });

        // Add reference to this in application instance
        $this->app = $app;
        $this->app['securilex'] = $this;
    }
1297222
public function register(Application $app)
    {
        if (!isset($app['descriptor.builder'])) {
            throw new Exception\MissingDependencyException(
                'The builder object that is used to construct the ProjectDescriptor is missing'
            );
        }

        $app['parser'] = $app->share(
            function ($app) {
                $parser = new Parser();
                $parser->setStopwatch($app['kernel.stopwatch']);
                $parser->setLogger($app['monolog']);

                return $parser;
            }
        );

        $app['markdown'] = $app->share(
            function () {
                return \Parsedown::instance();
            }
        );

        /** @var Translator $translator  */
        $translator = $app['translator'];
        $translator->addTranslationFolder(__DIR__ . DIRECTORY_SEPARATOR . 'Messages');

        $app['parser.files'] = new Collection();
        $app->command(new ParseCommand($app['descriptor.builder'], $app['parser'], $translator, $app['parser.files']));
    }