Registers services on the given container.

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

@param \Pimple $mainContainer An Container instance
556276
public function register(\Pimple $mainContainer)
    {
        $mainContainer['listener.response_exception'] = $mainContainer->share(function () {
            return new ResponseExceptionListener();
        });

        $mainContainer['listener.processor_response_render'] = $mainContainer->share(function () {
            return new ResponsePostRendererListener();
        });

        // Response Processors
        $mainContainer['response.processor.compress'] = $mainContainer->share(function () {
            return new CompressProcessor();
        });

        $dispatcher = $mainContainer['dispatcher'];
        
        $dispatcher->addSubscriber($mainContainer['listener.response_exception']);
        $dispatcher->addSubscriber($mainContainer['listener.processor_response_render']);
    }
925204
public function register(Container $container)
    {
        $router = new RouteCollection(config()->get('namespace', '\\Controller\\'));
        $dispatcher = new RouteDispatcher($router, $container['config']->get('middleware', []));

        $container->add('router', $router);
        $container->add('dispatcher', $dispatcher);

        include app()->getPath().'/config/routes.php';
    }
708899
public function bootstrap(ServiceProviderInterface $serviceProvider = null)
    {
        $container = $this->createNew(Container::class);

        if (isset($serviceProvider)) {
            $container->registerServices($serviceProvider);    
        }

        $xizlrServiceProvider = $this->createNew(ServiceProvider::class);
        $container->registerServices($xizlrServiceProvider);

        $this->setContainer($container);
    }
1354977
public function register(Container $app)
    {
        $app[DataInterface::class] = $app->factory(Data::class);
        $app[ConfigInterface::class] = $app->factory(FileConfig::class);
    }
280194
public function register(Container $pimple)
    {
        $pimple['singular.service.pack'] = function () use ($pimple) {
            return new PackService(
                $pimple['singular.directory.src'],
                $pimple['singular.directory.app'].DIRECTORY_SEPARATOR."packs"
            );
        };

        $pimple['singular.service.command'] = function() use ($pimple) {
            return new CommandService(
                $pimple['singular.directory.src'],
                $pimple['singular.service.pack']
            );
        };
        
        $pimple['singular.service.service'] = function() use ($pimple) {
            return new ServiceService(
                $pimple['singular.directory.src'],
                $pimple['singular.service.pack']
            );
        };

        $pimple['singular.service.store'] = function() use ($pimple) {
            return new StoreService(
                $pimple['singular.directory.src'],
                $pimple['singular.service.pack']
            );
        };

        $pimple['singular.service.controller'] = function() use ($pimple) {
            return new ControllerService(
                $pimple['singular.directory.src'],
                $pimple['singular.service.pack']
            );
        };

        $pimple['singular.service.module'] = function() use ($pimple) {
            return new ModuleService(
                $pimple['injector.directory.src']
            );
        };

        $pimple['singular.service.menu'] = function() use ($pimple) {
            return new MenuService(
                $pimple['singular.directory.root'],
                $pimple['db']
            );
        };

        $pimple['singular.service.front_controller'] = function() use ($pimple) {
            return new FrontControllerService(
                $pimple['injector.directory.src']
            );
        };

        $pimple['singular.service.front_service'] = function() use ($pimple) {
            return new FrontServiceService(
                $pimple['injector.directory.src']
            );
        };

        $pimple['singular.service.front_view'] = function() use ($pimple) {
            return new FrontViewService(
                $pimple['injector.directory.src']
            );
        };

        $pimple['singular.service.component'] = function() use ($pimple) {
            return new ComponentService(
                $pimple['singular.directory.root'],
                $pimple['db']
            );
        };

        $pimple['singular.command.create_pack'] = function () {
            return new CreatePackCommand();
        };
        
        $pimple['singular.command.disable_pack'] = function () {
            return new DisablePackCommand();
        };

        $pimple['singular.command.enable_pack'] = function () {
            return new EnablePackCommand();
        };

        $pimple['singular.command.create_command'] = function () {
            return new CreateCommandCommand();
        };

        $pimple['singular.command.create_service'] = function () {
            return new CreateServiceCommand();
        };

        $pimple['singular.command.create_controller'] = function () {
            return new CreateControllerCommand();
        };

        $pimple['singular.command.create_store'] = function () {
            return new CreateStoreCommand();
        };

        $pimple['singular.command.create_module'] = function () {
            return new CreateModuleCommand();
        };

        $pimple['singular.command.create_front_controller'] = function () {
            return new CreateFrontControllerCommand();
        };

        $pimple['singular.command.create_front_service'] = function () {
            return new CreateFrontServiceCommand();
        };

        $pimple['singular.command.create_front_view'] = function () {
            return new CreateFrontViewCommand();
        };

        $pimple['singular.command.create_component_migration'] = function () {
            return new CreateComponentMigrationCommand();
        };

        $pimple['singular.command.create_menu_migration'] = function () {
            return new CreateMenuMigrationCommand();
        };

        $pimple['singular.command.grant_full_access'] = function () {
            return new GrantFullAccessCommand();
        };
    }
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;
    }
19202
public function register(Container $container)
    {
        $this->registerConfig($container);
        $this->reggisterDateHelper($container);
        $this->registerSectionServices($container);
        $this->registerNewsServices($container);
        $this->registerEventServices($container);
    }
57230
public function register()
    {
        $this->getContainer()->singleton(Annotation::class, function() {
            Annotation::setContainer($this->getContainer());

            $annotation =  new Annotation((new Parser())->skipPhpDoc());

            return $annotation->addCommand(new Inject())
                ->addCommand(new Provider());
        });
    }
1318989
public function register(ContainerInterface $container, Configurable $config)
    {
        if (! $config instanceof Config) {
            throw new \InvalidArgumentException('Wrong Config object');
        }

        $logger = new Logger($config->name, $config->handlers);

        $container->add($config->getServiceName(), $logger);
    }
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 );
	}
319283
public function register(Container $container)
    {
        // Authentication
        $container->share(Authentication::class, [$this, 'authentication'])
            ->bindShared(AuthenticationInterface::class, Authentication::class);

        // Authorisation
        $container->share(Authorisation::class, [$this, 'authorisation'])
            ->bindShared(AuthorisationInterface::class, Authorisation::class);

        // User Handler
        $this->prepareHandler($container);

        // User Manager
        $container->prepareSharedObject(UserManager::class);
    }
171023
public function register(Container $pimple)
    {
        $pimple["$this->prefix.config"] = $this->defineDefaultConfig();
        $pimple["$this->prefix.command_bus"] = $this->setUpCommandBus($pimple);
        $pimple["$this->prefix.event_bus"] = $this->setUpEventBus();
        $pimple["$this->prefix.event_store"] = $this->setUpEventStore($pimple);
        $pimple["$this->prefix.snapshot_store"] = $this->setUpSnapshotStore($pimple);
        $pimple["$this->prefix.snapshotter"] = $this->setUpSnapshotter($pimple);
        $pimple["$this->prefix.repository.aggregate"] = $this->setUpAggregateRepository();
        $pimple["$this->prefix.serializer"] = $this->setUpSerializer($pimple);
    }
448628
public function registerServices($dependencyInjector)
    {
        /**
         * @var $options Config
         * @var $settings Config
         */
        $options = $dependencyInjector->get('config');
        $settings = $options->get('modules')->get($this::NAME);
        /**
         * @var $configLoader ConfigLoader
         */
        $configLoader = $dependencyInjector->get('config-loader');

        if ($settings->get('config', false) == false) {
            $settings->offsetSet(
                'config',
                $this->loadConfig($this::DIR . $this::CONFIG, $configLoader)
            );
        }

        if ($settings->get('global_services') == false) {
            /**
             * @var Registrant $registrant
             */
            $registrant = $dependencyInjector->get('registrant');
            $registrant->setServices(
                $this->loadConfig($this::DIR . $this::SERVICES, $configLoader)
            );
            $registrant->registration();
        }
    }
512800
public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $classInfo = new \ReflectionClass($this);
        $dir =  dirname($classInfo->getFileName());
        $loader->load($dir . '/config.yml');
    }
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;
    }
397733
public function register(Container $container)
    {
        if (!isset($container->get('settings')['view'])) {
            throw new InvalidArgumentException('Template configuration not found');
        }

        $engine = new Plates(
            $container->get('settings')['view'],
            $container->get('response')
        );

        $engine->loadExtension(
            new PlatesExtension(
                $container->get('router'),
                $container->get('request')->getUri()
            )
        );

        $container['view'] = $engine;
    }
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;
    }