Registers services on the given container.

This method should only be used to configure services and parameters.
It should not get services.

@param Container $pimple A container instance
340282
public function register(Container $pimple)
    {
        $pimple['oauth'] = function ($pimple) {
            return new App($pimple['access_token']);
        };

        $pimple['auth'] = function ($pimple) {
            return new Web($pimple['access_token']);
        };

        $auth_work = function ($pimple) {
            return new WorkWeb($pimple['access_token']);
        };

        $pimple['auth_work'] = $auth_work;
        $pimple['auth.work'] = $auth_work;
    }
48298
public function register(Container $pimple)
    {
        $settings = $pimple->get('settings')['renderer'];
        if (is_null($settings)) {
            throw new InvalidSettingsException('Please configure the renderer settings with valid `template_path` and `template_ext` values.');
        }

        $engine = new PlatesRenderer($settings['template_path'], $settings['template_ext']);
        $engine->getEngine()->loadExtension(
            new PlatesSlimRouterExtension($pimple->get('router'))
        );

        $pimple['renderer'] = $engine;
    }
531612
public function register(Container $container)
    {
        $closure = function (Container $container) {
            $tz = $container->get('config')->get('system.timezone', 'UTC');

            return new Chronos('now', new \DateTimeZone($tz));
        };

        $container->set(Chronos::class, $closure);
    }
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);
        }
    }
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;
            };
        }
    }
815926
private function merge(Container $pimple, array $config)
    {
        foreach ($config as $name => $value) {
            if (isset($pimple[$name]) && is_array($value)) {
                $pimple[$name] = $this->mergeRecursively($pimple[$name], $value);
            } else {
                $pimple[$name] = $this->doReplacements($value);
            }
        }
    }
519985
public function register(Container $pimple)
    {
        $pimple['user'] = function ($pimple) {
            return new User($pimple['access_token']);
        };

        $department = function ($pimple) {
            return new Department($pimple['access_token']);
        };

        $tag = function ($pimple) {
            return new Tag($pimple['access_token']);
        };

        $batch = function ($pimple) {
            return new Batch($pimple['access_token']);
        };

        $pimple['department'] = $department;
        $pimple['party'] = $department;

        $pimple['user_party'] = $department;
        $pimple['user.party'] = $department;

        $pimple['user_department'] = $department;
        $pimple['user.department'] = $department;

        $pimple['tag'] = $tag;

        $pimple['user_tag'] = $tag;
        $pimple['user.tag'] = $tag;

        $pimple['user_batch'] = $batch;
        $pimple['user.batch'] = $batch;
    }
793634
public function register( Container $container ) {
		$this->container = $container;

		$this->container->define( array( 'router' => 'Intraxia\Jaxion\Http\Router' ), $router = new Router );

		$this->add_routes( $router );
	}
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);
    }
774043
public function registerService($service, $name = '') {
        if (empty($name)) {
            $name = Assist::classNameShort($service);
        }

        static::$container->offsetSet(strtolower($name), $service);
    }
670011
private function loadServiceConfigurations(PimpleGate $container)
    {
        $paths = $container->getSymfonyParameter('cca.legacy_dic');

        // include the module services configurations
        foreach ($paths as $file) {
            require_once $file;
        }
    }
683764
public function register(\Pimple $container)
    {
        $container['itkg-core.command.db_update.runner'] = $container->share(
            function ($container) {
                return new Runner($container['doctrine.connection']);
            }
        );

        $container['itkg-core.command.db_update.decorator'] = $container->share(
            function () {
                return new DatabaseUpdate\Query\Decorator(
                    new TemplateLoader()
                );
            }
        );

        $container['itkg-core.command.db_update.display'] = $container->share(
            function () {
                return new DatabaseUpdate\Display(
                    new DatabaseUpdate\Layout\Parser(),
                    new Formatter()
                );
            }
        );

        $container['itkg-core.command.db_update.setup'] = $container->share(
            function ($container) {
                return new Setup(
                    $container['itkg-core.command.db_update.runner'],
                    new Loader($container['doctrine.connection']),
                    new Factory(),
                    new Locator(),
                    $container['itkg-core.command.db_update.decorator'],
                    new DatabaseUpdate\ReleaseChecker()
                );
            }
        );

        $container['itkg-core.command.database_update'] = $container->share(
            function ($container) {
                return new DatabaseUpdateCommand(
                    $container['itkg-core.command.db_update.setup'],
                    $container['itkg-core.command.db_update.display'],
                    'itkg-core:database:update'
                );
            }
        );

        $container['itkg-core.command.database_list'] = $container->share(
            function ($container) {
                return new DatabaseListCommand(
                    new Locator(),
                    new Finder(),
                    new DatabaseUpdate\ReleaseChecker(),
                    'itkg-core:database:list'
                );
            }
        );
    }
951766
protected function registerServiceProviders( $service_providers, Container $container ) {
		foreach ( $service_providers as $provider ) {
			$provider->register( $container );
		}
	}
21844
public function register(Container $app)
    {
        $app["cache.service"] = function(Container $app) {
            $handlerClass = ucfirst($app["config.service"]["cache.handler"]);

            return new \SlaxWeb\Cache\Manager(
                $app["cache{$handlerClass}Handler.service"]
            );
        };

        $app["cacheFileHandler.service"] = function(Container $app) {
            return new \SlaxWeb\Cache\Handler\File(
                $app["config.service"]["cache.location"],
                $app["config.service"]["cache.maxAge"]
            );
        };
    }
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);
            }
        }
    }
34288
public function registerServices(DiInterface $di)
    {
        // registering view
        $config = $di->get('config');
        $view = $di->get('view');
        $view->setViewsDir(__DIR__. '/views/');
        $view->setMainView('main');
        $view->setLayoutsDir($config->application->layoutsDir);
        $view->setPartialsDir($config->application->adminPartialDir );
        $view->setLayout('private');
    }
484427
public function register(Container $container)
    {
        $closure = function (Container $container) {
            $manager = $container->newInstance(LoggerManager::class, [
                'logPath' => $container->get('config')->get('path.logs')
            ]);

            return $manager;
        };

        $container->share(LoggerManager::class, $closure);
    }