FeedWriter\Feed::setEncoding PHP Method

setEncoding() public method

Set the 'encoding' attribute in the XML prolog.
public setEncoding ( string $encoding ) : self
$encoding string value of 'encoding' attribute
return self
    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;
    }