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

Public Member Functions

 __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 Member Functions

 _validateTagUri ($id)
 Validate a URI using the tag scheme (RFC 4151)
 
 _loadExtensions ()
 Load extensions from Zend.
 

Protected Attributes

 $data = []
 
 $type = null
 
 $extensions
 

Constructor & Destructor Documentation

__construct ( )

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

Member Function Documentation

__call (   $method,
  $args 
)

Method overloading: call given method on first extension implementing it.

Parameters
string$method
array$args
Returns
mixed
Exceptions
Exception\BadMethodCallExceptionif no extensions implements the method
_loadExtensions ( )
protected

Load extensions from Zend.

Exceptions
Exception\RuntimeException
Returns
void
_validateTagUri (   $id)
protected

Validate a URI using the tag scheme (RFC 4151)

Parameters
string$id
Returns
bool
addAuthor ( array  $author)

Set a single author.

The following option keys are supported: 'name' => (string) The name 'email' => (string) An optional email 'uri' => (string) An optional and valid URI

Parameters
array$author
Exceptions
Exception\InvalidArgumentExceptionIf any value of $author not follow the format.
Returns
AbstractFeed
addAuthors ( array  $authors)

Set an array with feed authors.

See Also
addAuthor
Parameters
array$authors
Returns
AbstractFeed
addCategories ( array  $categories)

Set an array of feed categories.

Parameters
array$categories
Returns
AbstractFeed
addCategory ( array  $category)

Add a feed category.

Parameters
array$category
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
addHub (   $url)

Add a Pubsubhubbub hub endpoint URL.

Parameters
string$url
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
addHubs ( array  $urls)

Add Pubsubhubbub hub endpoint URLs.

Parameters
array$urls
Returns
AbstractFeed
getAuthor (   $index = 0)

Get a single author.

Parameters
int$index
Returns
string|null
getAuthors ( )

Get an array with feed authors.

Returns
array
getBaseUrl ( )

Get the feed's base url.

Returns
string|null
getCategories ( )

Get the feed categories.

Returns
string|null
getCopyright ( )

Get the copyright entry.

Returns
string|null
getDateCreated ( )

Get the feed creation date.

Returns
string|null
getDateModified ( )

Get the feed modification date.

Returns
string|null
getDescription ( )

Get the feed description.

Returns
string|null
getEncoding ( )

Get the feed character encoding.

Returns
string|null
getFeedLinks ( )

Get a link to the XML feed.

Returns
string|null
getGenerator ( )

Get the feed generator entry.

Returns
string|null
getHubs ( )

Get the URLs used as Pubsubhubbub hubs endpoints.

Returns
string|null
getId ( )

Get the feed ID.

Returns
string|null
getImage ( )

Get the feed image URI.

Returns
array
getLanguage ( )

Get the feed language.

Returns
string|null
getLastBuildDate ( )

Get the feed last-build date.

Returns
string|null
getLink ( )

Get a link to the HTML source.

Returns
string|null
getTitle ( )

Get the feed title.

Returns
string|null
getType ( )

Retrieve the current or last feed type exported.

Returns
string Value will be "rss" or "atom"
remove (   $name)

Unset a specific data point.

Parameters
string$name
Returns
AbstractFeed
reset ( )

Resets the instance and deletes all data.

Returns
void
setBaseUrl (   $url)

Set the feed's base URL.

Parameters
string$url
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setCopyright (   $copyright)

Set the copyright entry.

Parameters
string$copyright
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setDateCreated (   $date = null)

Set the feed creation date.

Parameters
null|int|DateTime
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setDateModified (   $date = null)

Set the feed modification date.

Parameters
null|int|DateTime
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setDescription (   $description)

Set the feed description.

Parameters
string$description
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setEncoding (   $encoding)

Set the feed character encoding.

Parameters
string$encoding
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setFeedLink (   $link,
  $type 
)

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

Parameters
string$link
string$type
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setGenerator (   $name,
  $version = null,
  $uri = null 
)

Set the feed generator entry.

Parameters
array | string$name
null | string$version
null | string$uri
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setId (   $id)

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

Parameters
string$id
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setImage ( array  $data)

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.

Parameters
array$data
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setLanguage (   $language)

Set the feed language.

Parameters
string$language
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setLastBuildDate (   $date = null)

Set the feed last-build date.

Ignored for Atom 1.0.

Parameters
null|int|DateTime
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setLink (   $link)

Set a link to the HTML source.

Parameters
string$link
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setTitle (   $title)

Set the feed title.

Parameters
string$title
Exceptions
Exception\InvalidArgumentException
Returns
AbstractFeed
setType (   $type)

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.

Parameters
string$type
Returns
AbstractFeed

Member Data Documentation

$data = []
protected
$extensions
protected
$type = null
protected