FeedWriter\Item
Universal Feed Writer
Item class - Used as feed element in Feed class
- Author: Anis uddin Ahmad <anisniit@gmail.com>
Synopsis
class Item
{
- // methods
- public void __construct()
- private int cpt()
- public Item addElement()
- public Item addElementArray()
- public array getElements()
- public string getVersion()
- public Item setDescription()
- public Item setContent()
- public Item setTitle()
- public Item setDate()
- public Item setLink()
- public Item addEnclosure()
- public Item setEnclosure()
- public Item setAuthor()
- public Item setId()
Members
private
-
$_cpt
Is used as a suffix when multiple elements have the same name. -
$elements
Collection of feed item elements -
$version
Contains the format of this feed.
Methods
private
- cpt() — Return an unique number
public
- __construct() — Constructor
- addElement() — Add an element to elements array
- addElementArray() — Set multiple feed elements from an array.
- addEnclosure() — Attach a external media to the feed item.
- getElements() — Return the collection of elements in this feed item
- getVersion() — Return the type of this feed item
- setAuthor() — Set the 'author' element of feed item.
- setContent() — Set the 'content' element of the feed item For ATOM feeds only
- setDate() — Set the 'date' element of the feed item.
- setDescription() — Set the 'description' element of feed item
- setEnclosure() — Alias of addEnclosure, for backward compatibility. Using only this method ensures that the 'enclosure' element will be present only once.
- setId() — Set the unique identifier of the feed item
- setLink() — Set the 'link' element of feed item
- setTitle() — Set the 'title' element of feed item