API Documentation

Feed/Writer/Feed.php

Zend Framework

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Feed_Writer  
version
$Id: Feed.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Feed_Writer_Feed

Extends from
\Zend_Feed_Writer_Feed_FeedAbstract
Implements
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Feed_Writer  

Properties

Propertyprotectedarray  $_entries= 'array'

Contains all entry objects

Default valuearrayDetails
Type
array
Propertyprotectedint  $_entriesKey= '0'

A pointer for the iterator to keep track of the entries array

Default value0Details
Type
int

Methods

methodpublic__call( string $method, array $args ) : mixed

Method overloading: call given method on first extension implementing it

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::__call()
Parameters
Name Type Description
$method string
$args array
Returns
Type Description
mixed
Throws
Exception Description
\Zend_Feed_Exception if no extensions implements the method
methodpublic__construct( ) : void

Constructor: Primarily triggers the registration of core extensions and loads those appropriate to this data container.

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::__construct()
methodprotected_loadExtensions( ) : void

Load extensions from Zend_Feed_Writer

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::_loadExtensions()
methodprotected_validateTagUri( string $id ) : bool

Validate a URI using the tag scheme (RFC 4151)

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::_validateTagUri()
Parameters
Name Type Description
$id string
Returns
Type Description
bool
methodpublicaddAuthor(  $name,  $email = null,  $uri = null ) : string|null

Set a single author

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addAuthor()
Parameters
Name Type Description
$name
$email
$uri
Returns
Type Description
stringnull
methodpublicaddAuthors(  $authors ) : array

Set an array with feed authors

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addAuthors()
Parameters
Name Type Description
$authors
Returns
Type Description
array
methodpublicaddCategories( array $categories ) : void

Set an array of feed categories

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addCategories()
Parameters
Name Type Description
$categories array
methodpublicaddCategory( string $category ) : void

Add a feed category

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addCategory()
Parameters
Name Type Description
$category string
methodpublicaddEntry( \Zend_Feed_Writer_Entry $entry ) : void

Appends a Zend_Feed_Writer_Entry object representing a new entry/item the feed data container's internal group of entries.

Parameters
Name Type Description
$entry \Zend_Feed_Writer_Entry
methodpublicaddHub( string $url ) : void

Add a Pubsubhubbub hub endpoint URL

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addHub()
Parameters
Name Type Description
$url string
methodpublicaddHubs( array $urls ) : void

Add Pubsubhubbub hub endpoint URLs

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::addHubs()
Parameters
Name Type Description
$urls array
methodpublicaddTombstone(  $deleted ) : void

Appends a Zend_Feed_Writer_Deleted object representing a new entry tombstone to the feed data container's internal group of entries.

Parameters
Name Type Description
$deleted
methodpubliccount( ) : int

Get the number of feed entries.

Required by the Iterator interface.

Returns
Type Description
int
methodpubliccreateEntry( ) : \Zend_Feed_Writer_Entry

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.

Returns
Type Description
\Zend_Feed_Writer_Entry
methodpubliccreateTombstone( ) : \Zend_Feed_Writer_Deleted

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.

Returns
Type Description
\Zend_Feed_Writer_Deleted
methodpubliccurrent( ) : \Zend_Feed_Reader_Entry_Interface

Return the current entry

Returns
Type Description
\Zend_Feed_Reader_Entry_Interface
methodpublicexport( string $type, bool $ignoreExceptions = false ) : string

Attempt to build and return the feed resulting from the data set

Parameters
Name Type Description
$type string

The feed type "rss" or "atom" to export as

$ignoreExceptions bool
Returns
Type Description
string
methodpublicgetAuthor( int $index = 0 ) : string|null

Get a single author

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getAuthor()
Parameters
Name Type Description
$index int
Returns
Type Description
stringnull
methodpublicgetAuthors( ) : array

Get an array with feed authors

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getAuthors()
Returns
Type Description
array
methodpublicgetBaseUrl( ) : string|null

Get the feed's base url

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getBaseUrl()
Returns
Type Description
stringnull
methodpublicgetCategories( ) : string|null

Get the feed categories

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getCategories()
Returns
Type Description
stringnull
methodpublicgetCopyright( ) : string|null

Get the copyright entry

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getCopyright()
Returns
Type Description
stringnull
methodpublicgetDateCreated( ) : string|null

Get the feed creation date

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getDateCreated()
Returns
Type Description
stringnull
methodpublicgetDateModified( ) : string|null

Get the feed modification date

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getDateModified()
Returns
Type Description
stringnull
methodpublicgetDescription( ) : string|null

Get the feed description

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getDescription()
Returns
Type Description
stringnull
methodpublicgetEncoding( ) : string|null

Get the feed character encoding

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getEncoding()
Returns
Type Description
stringnull
methodpublicgetEntry( int $index = 0 ) : void

Retrieve a specific indexed entry from the internal queue. Entries must be added to a feed container in order to be indexed.

Parameters
Name Type Description
$index int
methodpublicgetFeedLinks( ) : string|null

Get a link to the XML feed

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getFeedLinks()
Returns
Type Description
stringnull
methodpublicgetGenerator( ) : string|null

Get the feed generator entry

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getGenerator()
Returns
Type Description
stringnull
methodpublicgetHubs( ) : string|null

Get the URLs used as Pubsubhubbub hubs endpoints

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getHubs()
Returns
Type Description
stringnull
methodpublicgetIcon( ) : array

Get the feed icon URI

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getIcon()
Returns
Type Description
array
methodpublicgetId( ) : string|null

Get the feed ID

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getId()
Returns
Type Description
stringnull
methodpublicgetImage( ) : array

Get the feed image URI

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getImage()
Returns
Type Description
array
methodpublicgetLanguage( ) : string|null

Get the feed language

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getLanguage()
Returns
Type Description
stringnull
methodpublicgetLastBuildDate( ) : string|null

Get the feed last-build date

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getLastBuildDate()
Returns
Type Description
stringnull
methodpublicgetLink( ) : string|null

Get a link to the HTML source

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getLink()
Returns
Type Description
stringnull
methodpublicgetTitle( ) : string|null

Get the feed title

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getTitle()
Returns
Type Description
stringnull
methodpublicgetType( ) : string

Retrieve the current or last feed type exported.

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::getType()
Returns
Type Description
string Value will be "rss" or "atom"
methodpublickey( ) : \unknown

Return the current feed key

Returns
Type Description
\unknown
methodpublicnext( ) : void

Move the feed pointer forward

methodpublicorderByDate( ) : void

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.

Using this method will alter the original indexation.

methodpublicremove( string $name ) : void

Unset a specific data point

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::remove()
Parameters
Name Type Description
$name string
methodpublicremoveEntry( int $index ) : void

Removes a specific indexed entry from the internal queue. Entries must be added to a feed container in order to be indexed.

Parameters
Name Type Description
$index int
methodpublicreset( ) : void

Resets the instance and deletes all data

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::reset()
methodpublicrewind( ) : void

Reset the pointer in the feed object

methodpublicsetBaseUrl( string $url ) : void

Set the feed's base URL

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setBaseUrl()
Parameters
Name Type Description
$url string
methodpublicsetCopyright(  $copyright ) : string|null

Set the copyright entry

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setCopyright()
Parameters
Name Type Description
$copyright
Returns
Type Description
stringnull
methodpublicsetDateCreated(  $date = null ) : void

Set the feed creation date

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setDateCreated()
Parameters
Name Type Description
$date null|integer|Zend_Date
methodpublicsetDateModified(  $date = null ) : void

Set the feed modification date

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setDateModified()
Parameters
Name Type Description
$date null|integer|Zend_Date
methodpublicsetDescription(  $description ) : string|null

Set the feed description

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setDescription()
Parameters
Name Type Description
$description
Returns
Type Description
stringnull
methodpublicsetEncoding( string $encoding ) : void

Set the feed character encoding

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setEncoding()
Parameters
Name Type Description
$encoding string
methodpublicsetFeedLink(  $link,  $type ) : string|null

Set a link to an XML feed for any feed type/version

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setFeedLink()
Parameters
Name Type Description
$link
$type
Returns
Type Description
stringnull
methodpublicsetGenerator(  $name,  $version = null,  $uri = null ) : string|null

Set the feed generator entry

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setGenerator()
Parameters
Name Type Description
$name
$version
$uri
Returns
Type Description
stringnull
methodpublicsetIcon( array $data ) : void

Set a feed icon (URI at minimum). Parameter is a single array with the required key 'uri'. Only 'uri' is required and used for Atom rendering.

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setIcon()

RSS does not support an Icon tag except via Atom 1.0 as an extension.

Parameters
Name Type Description
$data array
methodpublicsetId( string $id ) : void

Set the feed ID - URI or URN (via PCRE pattern) supported

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setId()
Parameters
Name Type Description
$id string
methodpublicsetImage( array $data ) : void

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.

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setImage()
Parameters
Name Type Description
$data array
methodpublicsetLanguage(  $language ) : string|null

Set the feed language

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setLanguage()
Parameters
Name Type Description
$language
Returns
Type Description
stringnull
methodpublicsetLastBuildDate(  $date = null ) : void

Set the feed last-build date. Ignored for Atom 1.0.

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setLastBuildDate()
Parameters
Name Type Description
$date null|integer|Zend_Date
methodpublicsetLink( string $link ) : void

Set a link to the HTML source

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setLink()
Parameters
Name Type Description
$link string
methodpublicsetTitle(  $title ) : string|null

Set the feed title

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setTitle()
Parameters
Name Type Description
$title
Returns
Type Description
stringnull
methodpublicsetType( string $type ) : void

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.

Inherited from: \Zend_Feed_Writer_Feed_FeedAbstract::setType()
Parameters
Name Type Description
$type string
methodpublicvalid( ) : boolean

Check to see if the iterator is still valid

Returns
Type Description
boolean
Documentation was generated by DocBlox 0.13.3.