public function setConfig(array $config) {
        if (!$config) {
            return $this;
        }

        foreach ($config as $key => $value) {
            switch ($key) {
                case 'open':
                case 'close':
                    $this->setBrackets($config['open'], $config['close']);
                break;
                case 'locale':
                    $this->setLocale($value);
                break;
                case 'disable':
                case 'disabled':
                    $this->disable($value);
                break;
                case 'shorthand':
                case 'shorthandLinks':
                    $this->setShorthand($value);
                break;
                case 'xhtml':
                case 'xhtmlOutput':
                    $this->setXhtml($value);
                break;
                case 'escape':
                case 'escapeHtml':
                    $this->setEscaping($value);
                break;
                case 'strict':
                case 'strictMode':
                    $this->setStrict($value);
                break;
                case 'newlines':
                case 'maxNewlines':
                    $this->setMaxNewlines($value);
                break;
                case 'standaloneTags':
                    $this->setStandaloneTags($value);
                break;
                case 'lineBreaks':
                    $this->setLineBreaks($value);
                break;
                case 'removeEmpty':
                    $this->setRemoveEmptyTags($value);
                break;
                case 'cacheExpires':
                    $this->setCacheExpiration($value);
                break;

                // Doesn't need a setter as it's only used in the constructor
                case 'configPath':
                    $this->_config['configPath'] = $value;
                break;
            }
        }

        return $this;
    }
public function setConfig(array $config) {
        if (!$config) {
            return $this;
        }

        foreach ($config as $key => $value) {
            switch ($key) {
                case 'open':
                case 'close':
                    $this->setBrackets($config['open'], $config['close']);
                break;
                case 'locale':
                    $this->setLocale($value);
                break;
                case 'disable':
                case 'disabled':
                    $this->disable($value);
                break;
                case 'shorthand':
                case 'shorthandLinks':
                    $this->setShorthand($value);
                break;
                case 'xhtml':
                case 'xhtmlOutput':
                    $this->setXhtml($value);
                break;
                case 'escape':
                case 'escapeHtml':
                    $this->setEscaping($value);
                break;
                case 'strict':
                case 'strictMode':
                    $this->setStrict($value);
                break;
                case 'newlines':
                case 'maxNewlines':
                    $this->setMaxNewlines($value);
                break;
                case 'standaloneTags':
                    $this->setStandaloneTags($value);
                break;
                case 'lineBreaks':
                    $this->setLineBreaks($value);
                break;
                case 'removeEmpty':
                    $this->setRemoveEmptyTags($value);
                break;
                case 'cacheExpires':
                    $this->setCacheExpiration($value);
                break;

                // Doesn't need a setter as it's only used in the constructor
                case 'configPath':
                    $this->_config['configPath'] = $value;
                break;
            }
        }

        return $this;
    }
public function setConfig ( array $ config ) { if ( ! $ config ) { return $ this ; } foreach ( $ config as $ key => $ value ) { switch ( $ key ) { case 'open' : case 'close' : $ this -> setBrackets ( $ config [ 'open' ] , $ config [ 'close' ] ) ; break ; case 'locale' : $ this -> setLocale ( $ value ) ; break ; case 'disable' : case 'disabled' : $ this -> disable ( $ value ) ; break ; case 'shorthand' : case 'shorthandLinks' : $ this -> setShorthand ( $ value ) ; break ; case 'xhtml' : case 'xhtmlOutput' : $ this -> setXhtml ( $ value ) ; break ; case 'escape' : case 'escapeHtml' : $ this -> setEscaping ( $ value ) ; break ; case 'strict' : case 'strictMode' : $ this -> setStrict ( $ value ) ; break ; case 'newlines' : case 'maxNewlines' : $ this -> setMaxNewlines ( $ value ) ; break ; case 'standaloneTags' : $ this -> setStandaloneTags ( $ value ) ; break ; case 'lineBreaks' : $ this -> setLineBreaks ( $ value ) ; break ; case 'removeEmpty' : $ this -> setRemoveEmptyTags ( $ value ) ; break ; case 'cacheExpires' : $ this -> setCacheExpiration ( $ value ) ; break ; // Doesn't need a setter as it's only used in the constructor case 'configPath' : $ this -> _config [ 'configPath' ] = $ value ; break ; } } return $ this ; }
Apply multiple configurations at once.

@param array $config
@return \Decoda\Decoda
Apply multiple configurations at once .