public function config($option = null, $value = null)
    {
        if ($option !== null) {
            self::ensureValidConfigOptions($option);

            if (!is_array($option)) {
                if ($value !== null) {
                    $this->config[$option] = $value;
                }
                return array_key_exists($option, $this->config) ? $this->config[$option] : null;
            }
            $this->config = $option;
        }
        return $this->config;
    }
public function config($option = null, $value = null)
    {
        if ($option !== null) {
            self::ensureValidConfigOptions($option);

            if (!is_array($option)) {
                if ($value !== null) {
                    $this->config[$option] = $value;
                }
                return array_key_exists($option, $this->config) ? $this->config[$option] : null;
            }
            $this->config = $option;
        }
        return $this->config;
    }
public function config ( $ option = null , $ value = null ) { if ( $ option !== null ) { self :: ensureValidConfigOptions ( $ option ) ; if ( ! is_array ( $ option ) ) { if ( $ value !== null ) { $ this -> config [ $ option ] = $ value ; } return array_key_exists ( $ option , $ this -> config ) ? $ this -> config [ $ option ] : null ; } $ this -> config = $ option ; } return $ this -> config ; }
Method to get or set the service's configuration.

@param mixed Pass an associative array to set multiple configuration options. Pass a string to get or set a single configuration option.
@param mixed Will be the value that is assigned when the name of a configuration option is passed in as the first parameter.
@throws UnknownConfigurationOptionException if an unknown configuration option is passed as an argument or via the associative array.

@return mixed Returns an associative array of configuration options if no parameters are passed, otherwise returns the value for the specified configuration option.
Method to get or set the service s configuration .