Rss2::__construct PHP Method

__construct() public method

构造函数,初始化RSS文档开头部分
public __construct ( string $title, string $link, string $description )
$title string
$link string
$description string
    public function __construct($title, $link, $description)
    {
        $this->xml .= '<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">';
        $this->xml .= '<channel>';
        $this->xml .= $this->createElement('title', $title);
        $this->xml .= $this->createElement('link', $link);
        $this->xml .= $this->createElement('description', $description);
        #$this->xml .= '</channel>';
    }