\Rss2

RSS2类.

Summary

Methods
Properties
Constants
__construct()
createElement()
addItem()
saveXML()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$channel
$xml
N/A

Properties

$channel

$channel : 

Type

$xml

$xml : string

Type

string — xml文档

Methods

__construct()

__construct(string  $title, string  $link, string  $description) 

构造函数,初始化RSS文档开头部分.

Parameters

string $title
string $link
string $description

createElement()

createElement(  $name,   $value) : string

构造元素节点.

Parameters

$name
$value

Returns

string

addItem()

addItem(  $title,   $link,   $description,   $date) 

添加文章节点.

Parameters

$title
$link
$description
$date

saveXML()

saveXML() : string

返回xml格式的RSS文档.

Returns

string