protected function createContainer()
    {
        $configDir = $this->pico->getConfigDir();
        $userContainer = $configDir . "PicoAuth/container.php";

        // If a user provided own container definiton, it is used
        if (is_file($userContainer) && is_readable($userContainer)) {
            $this->container = include $userContainer;
            if ($this->container === false || !($this->container instanceof \League\Container\Container)) {
                throw new \RuntimeException("The container.php does not return container instance.");
            }
        } else {
            $this->container = include $this->pluginDir . '/src/container.php';
        }

        // Additional container entries
        $this->container->share('configDir', new \League\Container\Argument\RawArgument($configDir));
        $this->container->share('PicoAuth', $this);
        if (!$this->config["rateLimit"]) {
            $this->container->share('RateLimit', \PicoAuth\Security\RateLimiting\NullRateLimit::class);
        }
    }
protected function createContainer()
    {
        $configDir = $this->pico->getConfigDir();
        $userContainer = $configDir . "PicoAuth/container.php";

        // If a user provided own container definiton, it is used
        if (is_file($userContainer) && is_readable($userContainer)) {
            $this->container = include $userContainer;
            if ($this->container === false || !($this->container instanceof \League\Container\Container)) {
                throw new \RuntimeException("The container.php does not return container instance.");
            }
        } else {
            $this->container = include $this->pluginDir . '/src/container.php';
        }

        // Additional container entries
        $this->container->share('configDir', new \League\Container\Argument\RawArgument($configDir));
        $this->container->share('PicoAuth', $this);
        if (!$this->config["rateLimit"]) {
            $this->container->share('RateLimit', \PicoAuth\Security\RateLimiting\NullRateLimit::class);
        }
    }
protected function createContainer ( ) { $ configDir = $ this -> pico -> getConfigDir ( ) ; $ userContainer = $ configDir . "PicoAuth/container.php" ; // If a user provided own container definiton, it is used if ( is_file ( $ userContainer ) && is_readable ( $ userContainer ) ) { $ this -> container = include $ userContainer ; if ( $ this -> container === false || ! ( $ this -> container instanceof \ League \ Container \ Container ) ) { throw new \ RuntimeException ( "The container.php does not return container instance." ) ; } } else { $ this -> container = include $ this -> pluginDir . '/src/container.php' ; } // Additional container entries $ this -> container -> share ( 'configDir' , new \ League \ Container \ Argument \ RawArgument ( $ configDir ) ) ; $ this -> container -> share ( 'PicoAuth' , $ this ) ; if ( ! $ this -> config [ "rateLimit" ] ) { $ this -> container -> share ( 'RateLimit' , \ PicoAuth \ Security \ RateLimiting \ NullRateLimit :: class ) ; } }
Creates PicoAuth's dependency container instance.

The plugin loads a default container definition from src/container.php
If there is a container.php in plugin configuration directory it is used
instead.

@throws \RuntimeException if the user provided invalid container.php
Creates PicoAuth s dependency container instance .