public function setEncoding($encoding)
    {
        if (empty($encoding))
            throw new \InvalidArgumentException('The encoding may not be empty or NULL.');
        if (!is_string($encoding))
            throw new \InvalidArgumentException('The encoding must be a string.');

        $this->encoding = $encoding;

        return $this;
    }
public function setEncoding($encoding)
    {
        if (empty($encoding))
            throw new \InvalidArgumentException('The encoding may not be empty or NULL.');
        if (!is_string($encoding))
            throw new \InvalidArgumentException('The encoding must be a string.');

        $this->encoding = $encoding;

        return $this;
    }
public function setEncoding ( $ encoding ) { if ( empty ( $ encoding ) ) throw new \ InvalidArgumentException ( 'The encoding may not be empty or NULL.' ) ; if ( ! is_string ( $ encoding ) ) throw new \ InvalidArgumentException ( 'The encoding must be a string.' ) ; $ this -> encoding = $ encoding ; return $ this ; }
Set the 'encoding' attribute in the XML prolog.

@access   public
@param    string $encoding value of 'encoding' attribute
@return   self
@throws   \InvalidArgumentException if the encoding is not a string, empty or NULL.
Set the encoding attribute in the XML prolog .