메소드 | 설명 | |
---|---|---|
__construct ( string $version = Feed::RSS2 ) | Constructor | |
addElement ( string $elementName, string $content, array $attributes = null, boolean $overwrite = FALSE, boolean $allowMultiple = FALSE ) : self | Add an element to elements array | |
addElementArray ( array $elementArray ) : self | Set multiple feed elements from an array. | |
addEnclosure ( string $url, integer $length, string $type, boolean $multiple = TRUE ) : self | Attach a external media to the feed item. | |
getElements ( ) : array | Return the collection of elements in this feed item | |
getVersion ( ) : string | Return the type of this feed item | |
setAuthor ( string $author, string | null $email = null, string | null $uri = null ) : self | Set the 'author' element of feed item. | |
setContent ( string $content ) : self | Set the 'content' element of the feed item For ATOM feeds only | |
setDate ( DateTim\DateTime | integer | string $date ) : self | Set the 'date' element of the feed item. | |
setDescription ( string $description ) : self | Set the 'description' element of feed item | |
setId ( string $id, boolean $permaLink = false ) : self | Set the unique identifier of the feed item | |
setLink ( string $link ) : self | Set the 'link' element of feed item | |
setTitle ( string $title ) : self | Set the 'title' element of feed item |
메소드 | 설명 | |
---|---|---|
cpt ( ) : integer | Return an unique number |
public __construct ( string $version = Feed::RSS2 ) | ||
$version | string | constant (RSS1/RSS2/ATOM) RSS2 is default. |
public addElement ( string $elementName, string $content, array $attributes = null, boolean $overwrite = FALSE, boolean $allowMultiple = FALSE ) : self | ||
$elementName | string | The tag name of an element |
$content | string | The content of tag |
$attributes | array | Attributes (if any) in 'attrName' => 'attrValue' format |
$overwrite | boolean | Specifies if an already existing element is overwritten. |
$allowMultiple | boolean | Specifies if multiple elements of the same name are allowed. |
리턴 | self |
public addElementArray ( array $elementArray ) : self | ||
$elementArray | array | |
리턴 | self |
public getElements ( ) : array | ||
리턴 | array | All elements of this item. |
public getVersion ( ) : string | ||
리턴 | string | The feed type, as defined in Feed.php |
public setContent ( string $content ) : self | ||
$content | string | Content for the item (i.e., the body of a blog post). |
리턴 | self |
public setDescription ( string $description ) : self | ||
$description | string | The content of the 'description' or 'summary' element |
리턴 | self |