Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Feed Class Reference

Public Member Functions

 createEntry ()
 Creates a new Zend data container for use.
 
 addTombstone (Deleted $deleted)
 Appends a Zend object representing a new entry tombstone to the feed data container's internal group of entries.
 
 createTombstone ()
 Creates a new Zend data container for use.
 
 addEntry (Entry $entry)
 Appends a Zend object representing a new entry/item the feed data container's internal group of entries.
 
 removeEntry ($index)
 Removes a specific indexed entry from the internal queue.
 
 getEntry ($index=0)
 Retrieve a specific indexed entry from the internal queue.
 
 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.
 
 count ()
 Get the number of feed entries.
 
 current ()
 Return the current entry.
 
 key ()
 Return the current feed key.
 
 next ()
 Move the feed pointer forward.
 
 rewind ()
 Reset the pointer in the feed object.
 
 valid ()
 Check to see if the iterator is still valid.
 
 export ($type, $ignoreExceptions=false)
 Attempt to build and return the feed resulting from the data set.
 
- Public Member Functions inherited from AbstractFeed
 __construct ()
 Constructor: Primarily triggers the registration of core extensions and loads those appropriate to this data container.
 
 addAuthor (array $author)
 Set a single author.
 
 addAuthors (array $authors)
 Set an array with feed authors.
 
 setCopyright ($copyright)
 Set the copyright entry.
 
 setDateCreated ($date=null)
 Set the feed creation date.
 
 setDateModified ($date=null)
 Set the feed modification date.
 
 setLastBuildDate ($date=null)
 Set the feed last-build date.
 
 setDescription ($description)
 Set the feed description.
 
 setGenerator ($name, $version=null, $uri=null)
 Set the feed generator entry.
 
 setId ($id)
 Set the feed ID - URI or URN (via PCRE pattern) supported.
 
 setImage (array $data)
 Set a feed image (URI at minimum).
 
 setLanguage ($language)
 Set the feed language.
 
 setLink ($link)
 Set a link to the HTML source.
 
 setFeedLink ($link, $type)
 Set a link to an XML feed for any feed type/version.
 
 setTitle ($title)
 Set the feed title.
 
 setEncoding ($encoding)
 Set the feed character encoding.
 
 setBaseUrl ($url)
 Set the feed's base URL.
 
 addHub ($url)
 Add a Pubsubhubbub hub endpoint URL.
 
 addHubs (array $urls)
 Add Pubsubhubbub hub endpoint URLs.
 
 addCategory (array $category)
 Add a feed category.
 
 addCategories (array $categories)
 Set an array of feed categories.
 
 getAuthor ($index=0)
 Get a single author.
 
 getAuthors ()
 Get an array with feed authors.
 
 getCopyright ()
 Get the copyright entry.
 
 getDateCreated ()
 Get the feed creation date.
 
 getDateModified ()
 Get the feed modification date.
 
 getLastBuildDate ()
 Get the feed last-build date.
 
 getDescription ()
 Get the feed description.
 
 getGenerator ()
 Get the feed generator entry.
 
 getId ()
 Get the feed ID.
 
 getImage ()
 Get the feed image URI.
 
 getLanguage ()
 Get the feed language.
 
 getLink ()
 Get a link to the HTML source.
 
 getFeedLinks ()
 Get a link to the XML feed.
 
 getTitle ()
 Get the feed title.
 
 getEncoding ()
 Get the feed character encoding.
 
 getBaseUrl ()
 Get the feed's base url.
 
 getHubs ()
 Get the URLs used as Pubsubhubbub hubs endpoints.
 
 getCategories ()
 Get the feed categories.
 
 reset ()
 Resets the instance and deletes all data.
 
 setType ($type)
 Set the current feed type being exported to "rss" or "atom".
 
 getType ()
 Retrieve the current or last feed type exported.
 
 remove ($name)
 Unset a specific data point.
 
 __call ($method, $args)
 Method overloading: call given method on first extension implementing it.
 

Protected Attributes

 $entries = []
 
 $entriesKey = 0
 
- Protected Attributes inherited from AbstractFeed
 $data = []
 
 $type = null
 
 $extensions
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractFeed
 _validateTagUri ($id)
 Validate a URI using the tag scheme (RFC 4151)
 
 _loadExtensions ()
 Load extensions from Zend.
 

Member Function Documentation

addEntry ( Entry  $entry)

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

Parameters
Entry$entry
Returns
Feed
addTombstone ( Deleted  $deleted)

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

Parameters
Deleted$deleted
Returns
void
count ( )

Get the number of feed entries.

Required by the Iterator interface.

Returns
int
createEntry ( )

Creates a new Zend 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
createTombstone ( )

Creates a new Zend 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
Deleted
current ( )

Return the current entry.

Returns
Entry
export (   $type,
  $ignoreExceptions = false 
)

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

Parameters
string$typeThe feed type "rss" or "atom" to export as
bool$ignoreExceptions
Exceptions
Exception\InvalidArgumentException
Returns
string
getEntry (   $index = 0)

Retrieve a specific indexed entry from the internal queue.

Entries must be added to a feed container in order to be indexed.

Parameters
int$index
Exceptions
Exception\InvalidArgumentException
key ( )

Return the current feed key.

Returns
mixed
next ( )

Move the feed pointer forward.

Returns
void
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.

Using this method will alter the original indexation.

Returns
Feed

Could do with some improvement for performance perhaps

removeEntry (   $index)

Removes a specific indexed entry from the internal queue.

Entries must be added to a feed container in order to be indexed.

Parameters
int$index
Exceptions
Exception\InvalidArgumentException
Returns
Feed
rewind ( )

Reset the pointer in the feed object.

Returns
void
valid ( )

Check to see if the iterator is still valid.

Returns
bool

Member Data Documentation

$entries = []
protected
$entriesKey = 0
protected