Feed/Writer/Feed.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Feed_Writer
- Version
- $Id: Feed.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Feed_Writer_Feed
- Implements
- Parent(s)
- \Zend_Feed_Writer_Feed_FeedAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_data = array()array()Details- Type
- array
- Inherited_from
- \Zend_Feed_Writer_Feed_FeedAbstract::$$_data

int $_entriesKey = 00Details- Type
- int

string $_type = nullnullDetails- Type
- string
- Inherited_from
- \Zend_Feed_Writer_Feed_FeedAbstract::$$_type
Methods

__call(string $method, array $args) : mixedMethod overloading: call given method on first extension implementing it
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::__call()| Name | Type | Description |
|---|---|---|
| $method | string | |
| $args | array |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Feed_Exception | if no extensions implements the method |

__construct() : voidConstructor: Primarily triggers the registration of core extensions and loads those appropriate to this data container.
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::__construct()
_loadExtensions() : voidLoad extensions from Zend_Feed_Writer
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::_loadExtensions()
_validateTagUri(string $id) : boolValidate a URI using the tag scheme (RFC 4151)
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::_validateTagUri()| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| bool |

addAuthor( $name, $email = null, $uri = null) : string | null| Name | Type | Description |
|---|---|---|
| $name | ||
| $uri |
| Type | Description |
|---|---|
| string | null |

addAuthors( $authors) : arraySet an array with feed authors
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addAuthors()| Name | Type | Description |
|---|---|---|
| $authors |
| Type | Description |
|---|---|
| array |

addCategories(array $categories) : voidSet an array of feed categories
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addCategories()| Name | Type | Description |
|---|---|---|
| $categories | array |

addEntry(\Zend_Feed_Writer_Entry $entry) : voidAppends a Zend_Feed_Writer_Entry object representing a new entry/item the feed data container's internal group of entries.
| Name | Type | Description |
|---|---|---|
| $entry | \Zend_Feed_Writer_Entry |

addHub(string $url) : voidAdd a Pubsubhubbub hub endpoint URL
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addHub()| Name | Type | Description |
|---|---|---|
| $url | string |

addHubs(array $urls) : voidAdd Pubsubhubbub hub endpoint URLs
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addHubs()| Name | Type | Description |
|---|---|---|
| $urls | array |

addTombstone( $deleted) : voidAppends a Zend_Feed_Writer_Deleted object representing a new entry tombstone to the feed data container's internal group of entries.
| Name | Type | Description |
|---|---|---|
| $deleted |

count() : intGet the number of feed entries.
Required by the Iterator interface.
| Type | Description |
|---|---|
| int |

createEntry() : \Zend_Feed_Writer_EntryCreates 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.
| Type | Description |
|---|---|
| \Zend_Feed_Writer_Entry |

createTombstone() : \Zend_Feed_Writer_DeletedCreates 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.
| Type | Description |
|---|---|
| \Zend_Feed_Writer_Deleted |

current() : \Zend_Feed_Reader_Entry_InterfaceReturn the current entry
| Type | Description |
|---|---|
| \Zend_Feed_Reader_Entry_Interface |

export(string $type, bool $ignoreExceptions = false) : stringAttempt to build and return the feed resulting from the data set
| Name | Type | Description |
|---|---|---|
| $type | string | The feed type "rss" or "atom" to export as |
| $ignoreExceptions | bool |
| Type | Description |
|---|---|
| string |

getAuthor(int $index = 0) : string | null| Name | Type | Description |
|---|---|---|
| $index | int |
| Type | Description |
|---|---|
| string | null |

getAuthors() : arrayGet an array with feed authors
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getAuthors()| Type | Description |
|---|---|
| array |

getCategories() : string | nullGet the feed categories
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getCategories()| Type | Description |
|---|---|
| string | null |

getDateCreated() : string | nullGet the feed creation date
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getDateCreated()| Type | Description |
|---|---|
| string | null |

getDateModified() : string | nullGet the feed modification date
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getDateModified()| Type | Description |
|---|---|
| string | null |

getDescription() : string | nullGet the feed description
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getDescription()| Type | Description |
|---|---|
| string | null |

getEncoding() : string | nullGet the feed character encoding
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getEncoding()| Type | Description |
|---|---|
| string | null |

getEntry(int $index = 0) : voidRetrieve a specific indexed entry from the internal queue.
Entries must be added to a feed container in order to be indexed.
| Name | Type | Description |
|---|---|---|
| $index | int |

getFeedLinks() : string | nullGet a link to the XML feed
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getFeedLinks()| Type | Description |
|---|---|
| string | null |

getGenerator() : string | nullGet the feed generator entry
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getGenerator()| Type | Description |
|---|---|
| string | null |

getHubs() : string | nullGet the URLs used as Pubsubhubbub hubs endpoints
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getHubs()| Type | Description |
|---|---|
| string | null |

getLastBuildDate() : string | nullGet the feed last-build date
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getLastBuildDate()| Type | Description |
|---|---|
| string | null |

getLink() : string | nullGet a link to the HTML source
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getLink()| Type | Description |
|---|---|
| string | null |

getType() : stringRetrieve the current or last feed type exported.
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getType()| Type | Description |
|---|---|
| string | Value will be "rss" or "atom" |

orderByDate() : voidOrders 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.
Using this method will alter the original indexation.

removeEntry(int $index) : voidRemoves a specific indexed entry from the internal queue.
Entries must be added to a feed container in order to be indexed.
| Name | Type | Description |
|---|---|---|
| $index | int |

reset() : voidResets the instance and deletes all data
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::reset()
setCopyright( $copyright) : string | null| Name | Type | Description |
|---|---|---|
| $copyright |
| Type | Description |
|---|---|
| string | null |

setDateCreated(null | integer | \Zend_Date $date = null) : voidSet the feed creation date
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setDateCreated()| Name | Type | Description |
|---|---|---|
| $date | null | integer | \Zend_Date |

setDateModified(null | integer | \Zend_Date $date = null) : voidSet the feed modification date
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setDateModified()| Name | Type | Description |
|---|---|---|
| $date | null | integer | \Zend_Date |

setDescription( $description) : string | nullSet the feed description
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setDescription()| Name | Type | Description |
|---|---|---|
| $description |
| Type | Description |
|---|---|
| string | null |

setEncoding(string $encoding) : voidSet the feed character encoding
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setEncoding()| Name | Type | Description |
|---|---|---|
| $encoding | string |

setFeedLink( $link, $type) : string | nullSet a link to an XML feed for any feed type/version
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setFeedLink()| Name | Type | Description |
|---|---|---|
| $link | ||
| $type |
| Type | Description |
|---|---|
| string | null |

setGenerator( $name, $version = null, $uri = null) : string | nullSet the feed generator entry
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setGenerator()| Name | Type | Description |
|---|---|---|
| $name | ||
| $version | ||
| $uri |
| Type | Description |
|---|---|
| string | null |

setIcon(array $data) : voidSet a feed icon (URI at minimum).
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setIcon()Parameter is a single array with the required key 'uri'. Only 'uri' is required and used for Atom rendering. RSS does not support an Icon tag except via Atom 1.0 as an extension.
| Name | Type | Description |
|---|---|---|
| $data | array |

setId(string $id) : voidSet the feed ID - URI or URN (via PCRE pattern) supported
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setId()| Name | Type | Description |
|---|---|---|
| $id | string |

setImage(array $data) : voidSet a feed image (URI at minimum).
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setImage()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.
| Name | Type | Description |
|---|---|---|
| $data | array |

setLanguage( $language) : string | null| Name | Type | Description |
|---|---|---|
| $language |
| Type | Description |
|---|---|
| string | null |

setLastBuildDate(null | integer | \Zend_Date $date = null) : voidSet the feed last-build date.
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setLastBuildDate()Ignored for Atom 1.0.
| Name | Type | Description |
|---|---|---|
| $date | null | integer | \Zend_Date |

setLink(string $link) : voidSet a link to the HTML source
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setLink()| Name | Type | Description |
|---|---|---|
| $link | string |

setTitle( $title) : string | null| Name | Type | Description |
|---|---|---|
| $title |
| Type | Description |
|---|---|
| string | null |

setType(string $type) : voidSet the current feed type being exported to "rss" or "atom".
Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setType()This allows other objects to gracefully choose whether to execute or not, depending on their appropriateness for the current type, e.g. renderers.
| Name | Type | Description |
|---|---|---|
| $type | string |