protected function getEncoding($encoding=null)
    {
        if(is_null($encoding))
        {
            if(!is_null($this->encoding))
            {
                return $this->encoding;
            }
            return self::getDefaultEncoding();
        }
        return $encoding;
    }
protected function getEncoding($encoding=null)
    {
        if(is_null($encoding))
        {
            if(!is_null($this->encoding))
            {
                return $this->encoding;
            }
            return self::getDefaultEncoding();
        }
        return $encoding;
    }
protected function getEncoding ( $ encoding = null ) { if ( is_null ( $ encoding ) ) { if ( ! is_null ( $ this -> encoding ) ) { return $ this -> encoding ; } return self :: getDefaultEncoding ( ) ; } return $ encoding ; }
Helper function to set default encoding
@param string $encoding
@return string
Helper function to set default encoding