Zend\Feed\Writer\Feed
Synopsis
class Feed
extends AbstractFeed
implements
Iterator,Countable
{
- // members
- protected array $entries;
- protected integer $entriesKey;
- // Inherited members from AbstractFeed
- protected array $data;
- protected string $type;
- protected $extensions $extensions;
- // methods
- public Entry createEntry()
- public void addTombstone()
- public Deleted createTombstone()
- public Feed addEntry()
- public Feed removeEntry()
- public void getEntry()
- public Feed orderByDate()
- public int count()
- public Entry current()
- public mixed key()
- public void next()
- public void rewind()
- public bool valid()
- public string export()
- // Inherited methods from AbstractFeed
- public void __construct()
- public AbstractFeed addAuthor()
- public AbstractFeed addAuthors()
- public AbstractFeed setCopyright()
- public AbstractFeed setDateCreated()
- public AbstractFeed setDateModified()
- public AbstractFeed setLastBuildDate()
- public AbstractFeed setDescription()
- public AbstractFeed setGenerator()
- public AbstractFeed setId()
- protected bool _validateTagUri()
- public AbstractFeed setImage()
- public AbstractFeed setLanguage()
- public AbstractFeed setLink()
- public AbstractFeed setFeedLink()
- public AbstractFeed setTitle()
- public AbstractFeed setEncoding()
- public AbstractFeed setBaseUrl()
- public AbstractFeed addHub()
- public AbstractFeed addHubs()
- public AbstractFeed addCategory()
- public AbstractFeed addCategories()
- public string|null getAuthor()
- public array getAuthors()
- public string|null getCopyright()
- public string|null getDateCreated()
- public string|null getDateModified()
- public string|null getLastBuildDate()
- public string|null getDescription()
- public string|null getGenerator()
- public string|null getId()
- public array getImage()
- public string|null getLanguage()
- public string|null getLink()
- public string|null getFeedLinks()
- public string|null getTitle()
- public string|null getEncoding()
- public string|null getBaseUrl()
- public string|null getHubs()
- public string|null getCategories()
- public void reset()
- public AbstractFeed setType()
- public string getType()
- public AbstractFeed remove()
- public mixed __call()
- protected void _loadExtensions()
Hierarchy
Members
protected
- $data
—
array
Contains all Feed level date to append in feed output - $entries
—
array
Contains all entry objects - $entriesKey
—
int
A pointer for the iterator to keep track of the entries array - $extensions — Zend\Feed\Writer\$extensions
- $type
—
string
Holds the value "atom" or "rss" depending on the feed type set when when last exported.
Methods
public
- addEntry() — Appends a Zend\Feed\Writer\Entry object representing a new entry/item the feed data container's internal group of entries.
- addTombstone() — Appends a Zend\Feed\Writer\Deleted object representing a new entry tombstone to the feed data container's internal group of entries.
- count() — Get the number of feed entries.
- createEntry() — Creates a new Zend\Feed\Writer\Entry data container for use. This is NOT added to the current feed automatically, but is necessary to create a container with some initial values preset based on the current feed data.
- createTombstone() — Creates a new Zend\Feed\Writer\Deleted data container for use. This is NOT added to the current feed automatically, but is necessary to create a container with some initial values preset based on the current feed data.
- current() — Return the current entry
- export() — Attempt to build and return the feed resulting from the data set
- getEntry() — Retrieve a specific indexed entry from the internal queue. Entries must be added to a feed container in order to be indexed.
- key() — Return the current feed key
- next() — Move the feed pointer forward
- orderByDate() — Orders all indexed entries by date, thus offering date ordered readable content where a parser (or Homo Sapien) ignores the generic rule that XML element order is irrelevant and has no intrinsic meaning.
- removeEntry() — Removes a specific indexed entry from the internal queue. Entries must be added to a feed container in order to be indexed.
- rewind() — Reset the pointer in the feed object
- valid() — Check to see if the iterator is still valid
Inherited from Zend\Feed\Writer\AbstractFeed
protected
- _loadExtensions() — Load extensions from Zend\Feed\Writer\Writer
- _validateTagUri() — Validate a URI using the tag scheme (RFC 4151)
public
- __call() — Method overloading: call given method on first extension implementing it
- addAuthor() — Set a single author
- addAuthors() — Set an array with feed authors
- addCategories() — Set an array of feed categories
- addCategory() — Add a feed category
- addHub() — Add a Pubsubhubbub hub endpoint URL
- addHubs() — Add Pubsubhubbub hub endpoint URLs
- getAuthor() — Get a single author
- getAuthors() — Get an array with feed authors
- getBaseUrl() — Get the feed's base url
- getCategories() — Get the feed categories
- getCopyright() — Get the copyright entry
- getDateCreated() — Get the feed creation date
- getDateModified() — Get the feed modification date
- getDescription() — Get the feed description
- getEncoding() — Get the feed character encoding
- getFeedLinks() — Get a link to the XML feed
- getGenerator() — Get the feed generator entry
- getHubs() — Get the URLs used as Pubsubhubbub hubs endpoints
- getId() — Get the feed ID
- getImage() — Get the feed image URI
- getLanguage() — Get the feed language
- getLastBuildDate() — Get the feed last-build date
- getLink() — Get a link to the HTML source
- getTitle() — Get the feed title
- getType() — Retrieve the current or last feed type exported.
- remove() — Unset a specific data point
- reset() — Resets the instance and deletes all data
- setBaseUrl() — Set the feed's base URL
- setCopyright() — Set the copyright entry
- setDateCreated() — Set the feed creation date
- setDateModified() — Set the feed modification date
- setDescription() — Set the feed description
- setEncoding() — Set the feed character encoding
- setFeedLink() — Set a link to an XML feed for any feed type/version
- setGenerator() — Set the feed generator entry
- setId() — Set the feed ID - URI or URN (via PCRE pattern) supported
- setImage() — Set a feed image (URI at minimum). Parameter is a single array with the required key 'uri'. When rendering as RSS, the required keys are 'uri', 'title' and 'link'. RSS also specifies three optional parameters 'width', 'height' and 'description'. Only 'uri' is required and used for Atom rendering.
- setLanguage() — Set the feed language
- setLastBuildDate() — Set the feed last-build date. Ignored for Atom 1.0.
- setLink() — Set a link to the HTML source
- setTitle() — Set the feed title
- setType() — Set the current feed type being exported to "rss" or "atom". This allows other objects to gracefully choose whether to execute or not, depending on their appropriateness for the current type, e.g. renderers.