Registers services on the given container.

@param Container $pimple
491308
public function register(Container $pimple)
    {
        $pimple['redis'] = function ($app) {
            $config = $app['config']['redis']['default'];

            $redis = new \Redis();
            $redis->connect($config['host'], $config['port'], $config['timeout']);

            return $redis;
        };
    }
690980
public function register(Container $container)
    {
        $this->registerViewConfig($container);
        $this->registerLoaderServices($container);
        $this->registerEngineServices($container);
        $this->registerMustacheTemplatingServices($container);
        $this->registerTwigTemplatingServices($container);
        $this->registerViewServices($container);
    }
305723
public function register(Container $container)
    {
        $app = $container->get('application');

        $container->share(WebApplication::class, $app);

        // Input
        $container->share(Input::class, function (Container $container) use ($app) {
            return PsrInput::create($app->getRequest());
        })->bindShared(PsrInput::class, Input::class);

        // Request
//        $container->share(ServerRequest::class, $app->getRequest())
//            ->alias(ServerRequestInterface::class, ServerRequest::class);

        // Environment
        $container->share(WebEnvironment::class, $app->getEnvironment());
        $container->share(Browser::class, $app->getEnvironment()->getBrowser());
        $container->share(Platform::class, $app->getEnvironment()->getPlatform());

        // Uri
        $container->share(UriData::class, function (Container $container) use ($app) {
            return $app->getServer()->getUriData();
        });
    }
806052
public function register(Container $container)
    {
        $container->prepareSharedObject(
            EventDispatcher::class,
            function (EventDispatcher $dispatcher, Container $container) {
                $dispatcher->foo = 'bar';

                return $dispatcher->setDebug($container->get('config')->get('system.debug'));
            }
        )->bindShared(Dispatcher::class, EventDispatcher::class)
            ->bindShared(DispatcherInterface::class, EventDispatcher::class);
    }
630073
public function process(Pimple $container, array $options)
    {
        $container['logger'] = $container->share(
          function () {
              return new NullLogger();
          }
        );

        $container['log_level'] = LogLevel::INFO;

        $container['log_sub_request'] = false;

        foreach ($options as $name => $value) {
            $container[$name] = $value;
        }

        return $container;
    }
679563
public static function initContainer($container)
    {
        if ($container instanceof \Pimple\Container) {
            static::$container = $container;
            static::$logger = static::$container
                ->offsetGet(\oat\oatbox\log\LoggerService::SERVICE_ID)
                ->getLogger();
        }
    }
75689
private function registerAlias(Container $pimple)
    {
        if ($this->builderAlias) {
            $pimple[$this->builderAlias] = function () use ($pimple) {
                return $pimple['http_client.builder'];
            };
        }

        if ($this->clientAlias) {
            $pimple[$this->clientAlias] = function () use ($pimple) {
                return $pimple['http_client.client'];
            };
        }

        return $pimple;
    }
412134
protected function registerSelectizeServices(Container $container)
    {
        /**
         * The Selectize Renderer.
         *
         * @param  Container $container The Pimple DI container.
         * @return SelectizeRenderer
         */
        $container['selectize/renderer'] = function (Container $container) {
            return new SelectizeRenderer([
                'logger'           => $container['logger'],
                'translator'       => $container['translator'],
                'template_factory' => $container['template/factory'],
                'view'             => $container['view']
            ]);
        };
    }
590897
public function register(Container $pimple)
    {
        $pimple['console'] = function ($pimple) {
            $console = new ContainerAwareApplication($pimple['console.name'], $pimple['console.version']);
            $console->setDispatcher($pimple['eventDispatcher']);
            $console->setContainer($pimple);

            return $console;
        };
    }
715435
public function registerProviders(Container $container)
    {
        $sysProvider = new PackageProvider($this);
        $container->registerServiceProvider($sysProvider);

        $sysProvider->boot();

        $providers = (array) $this->get('providers');

        foreach ($providers as $interface => &$provider) {
            if ($provider === false) {
                continue;
            }

            if (is_subclass_of($provider, ServiceProviderInterface::class)) {
                // Handle provider
                if ($provider instanceof ClassMeta || (is_string($provider) && class_exists($provider))) {
                    $provider = $container->newInstance($provider);
                }

                if ($provider === false) {
                    continue;
                }

                $container->registerServiceProvider($provider);

                if ($provider instanceof BootableProviderInterface || method_exists($provider, 'boot')) {
                    $provider->boot($container);
                }
            } else {
                // Handle Service
                if (is_numeric($interface)) {
                    $container->prepareSharedObject($provider);
                } else {
                    $container->bindShared($interface, $provider);
                }
            }
        }

        foreach ($providers as $provider) {
            if ($provider === false) {
                continue;
            }

            if (is_subclass_of($provider, ServiceProviderInterface::class) && (
                $provider instanceof BootableDeferredProviderInterface
                || method_exists($provider, 'bootDeferred')
            )) {
                $provider->bootDeferred($container);
            }
        }
    }
938104
public function register(Container $container)
    {
        $this->registerFinder($container);
        $this->registerSections($container);
        $this->registerTemplate($container);
        $this->registerEngine($container);
    }
390304
public function register()
    {   
        $providers = config('app','core_providers');
        foreach ($providers as $key => $value) {
            $this->getContainer()->add($value);
        }
    }
29573
public function register(ContainerInterface $container)
    {
        if (! isset($container['session'])) {
            $container['session'] = function (ContainerInterface $container) {
                return new Session;
            };
        }

        if (! isset($container['router'])) {
            /**
             * This service MUST return a SHARED instance
             * of Mbh\Interfaces\RouterInterface.
             *
             * @param Container $container
             * @return RouterInterface
             */
            $container['router'] = function (ContainerInterface $container) {
                $routerCacheFile = false;
                if (isset($container->get('settings')['routerCacheFile'])) {
                    $routerCacheFile = $container->get('settings')['routerCacheFile'];
                }

                $router = (new Router)->setCacheFile($routerCacheFile);
                if (method_exists($router, 'setContainer')) {
                    $router->setContainer($container);
                }

                if (method_exists($router, 'setCallableResolver')) {
                    $router->setCallableResolver($container['callableResolver']);
                }

                return $router;
            };
        }
    }
814922
protected function registerContainerAliases()
    {
        $aliases = [
            'app' => ['Illuminate\Container\Container', 'Illuminate\Contracts\Container\Container'],
            'config' => ['Illuminate\Config\Repository', 'Illuminate\Contracts\Config\Repository'],
            'log' => ['Psr\Log\LoggerInterface'],
        ];
        
        foreach ($aliases as $key => $aliases) {
            foreach ($aliases as $alias) {
                $this->alias($key, $alias);
            }
        }
    }
635503
public function register()
    {
        $this->container['config']->addLocation($this->container->basePath().'/dev/config');

        foreach ($this->container['config']->get('app.providers') as $provider) {
            $this->container->addProvider($provider);
        }
    }
675450
public function register(Container $container)
    {
        $config = $container->get('config');

        if ($config->get('system.debug')) {
            $whoops = new Whoops();

            $handler = new PrettyPageHandler();
            $handler->setEditor($config->get('whoops.editor', 'phpstorm'));

            $whoops->pushHandler($handler);

            $container->share(Whoops::class, $whoops)
                ->alias('whoops', Whoops::class);

            $container->share(PrettyPageHandler::class, $handler)
                ->alias('whoops.handler', PrettyPageHandler::class);
        }
    }
59911
protected function registerProviders(Container $container): void
    {
        foreach (self::$providers as $className) {
            $container->addServiceProvider($className);
        }
    }