FeedWriter\Item

Universal Feed Writer

Item class - Used as feed element in Feed class

Synopsis

class Item {
}

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
  • setTitle() — Set the 'title' element of feed item