public function configure($key, $value=null)
    {
        if ($this->wasBooted()) {
            throw new UnsupportedUsageException('You can only set configuration before boot.');
        }

        if (!is_array($key)) {
            $this->config[$key] = $value;
            return $this;
        }

        foreach ($key as $configKey=>$value) {
            $this->configure($configKey, $value);
        }

        return $this;

    }
public function configure($key, $value=null)
    {
        if ($this->wasBooted()) {
            throw new UnsupportedUsageException('You can only set configuration before boot.');
        }

        if (!is_array($key)) {
            $this->config[$key] = $value;
            return $this;
        }

        foreach ($key as $configKey=>$value) {
            $this->configure($configKey, $value);
        }

        return $this;

    }
public function configure ( $ key , $ value = null ) { if ( $ this -> wasBooted ( ) ) { throw new UnsupportedUsageException ( 'You can only set configuration before boot.' ) ; } if ( ! is_array ( $ key ) ) { $ this -> config [ $ key ] = $ value ; return $ this ; } foreach ( $ key as $ configKey => $ value ) { $ this -> configure ( $ configKey , $ value ) ; } return $ this ; }
Set a configuration value. To prevent misuse the configuration values can
not be changed after booting. Otherwise somebody will use it as a global
variable storage.

@param string|array $key
@param mixed        $value (optional)

@return self
Set a configuration value . To prevent misuse the configuration values can not be changed after booting . Otherwise somebody will use it as a global variable storage .