Larabros\Elogram\Providers\CoreServiceProvider::register PHP Method

register() public method

Use the register method to register items with the container via the protected $this->container property or the getContainer method from the ContainerAwareTrait.
public register ( ) : void
return void
    public function register()
    {
        $container = $this->getContainer();
        $config = $container->get('config');
        $container->share(AdapterInterface::class, function () use($config, $container) {
            return new LeagueAdapter(['clientId' => $config->get('client_id'), 'clientSecret' => $config->get('client_secret'), 'redirectUri' => $config->get('redirect_url')], ['httpClient' => $container->get(Client::class)]);
        });
        if ($config->get('session_store') === NativeSessionStore::class) {
            $container->share(DataStoreInterface::class, function () {
                return new NativeSessionStore();
            });
        }
        $container->share(RedirectLoginHelper::class, function () use($container) {
            return new RedirectLoginHelper($container->get(AdapterInterface::class), $container->get(DataStoreInterface::class));
        });
    }
CoreServiceProvider