public function config($name, $value = null)
    {
        // Check for massive assignaments
        if (is_array($name)) {
            foreach ($name as $key => $value) {
                $this->config($key, $value);
            }
            return true;
        }

        // Assign a new value
        if (isset($value)) {
            $this->container['settings'][$name] = $value;
        }

        // Abort if the configuration key does not exist
        if (!isset($this->container['settings'][$name])) {
            throw new \Exception('Configuration key not defined: ' . $name, 500);
        }

        // Return value
        return $this->container['settings'][$name];
    }
public function config($name, $value = null)
    {
        // Check for massive assignaments
        if (is_array($name)) {
            foreach ($name as $key => $value) {
                $this->config($key, $value);
            }
            return true;
        }

        // Assign a new value
        if (isset($value)) {
            $this->container['settings'][$name] = $value;
        }

        // Abort if the configuration key does not exist
        if (!isset($this->container['settings'][$name])) {
            throw new \Exception('Configuration key not defined: ' . $name, 500);
        }

        // Return value
        return $this->container['settings'][$name];
    }
public function config ( $ name , $ value = null ) { // Check for massive assignaments if ( is_array ( $ name ) ) { foreach ( $ name as $ key => $ value ) { $ this -> config ( $ key , $ value ) ; } return true ; } // Assign a new value if ( isset ( $ value ) ) { $ this -> container [ 'settings' ] [ $ name ] = $ value ; } // Abort if the configuration key does not exist if ( ! isset ( $ this -> container [ 'settings' ] [ $ name ] ) ) { throw new \ Exception ( 'Configuration key not defined: ' . $ name , 500 ) ; } // Return value return $ this -> container [ 'settings' ] [ $ name ] ; }
Configure application settings

@param string|array $name Setting to set or retrieve
@param mixed $value If passed, value to apply on the setting
@return mixed Value of a setting
Configure application settings