package Default
inherited_from \Zend\Feed\Writer\AbstractFeed

 Methods

Method overloading: call given method on first extension implementing it

__call(string $method, array $args) : mixed
Inherited

Parameters

$method

string

$args

array

Exceptions

\Zend\Feed\Writer\Exception\BadMethodCallException if no extensions implements the method

Returns

mixed

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

__construct() 
Inherited

Set a single author

addAuthor(array $author) : \Zend\Feed\Writer\AbstractFeed
Inherited

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

Parameters

$author

array

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException If any value of $author not follow the format.

Returns

\Zend\Feed\Writer\AbstractFeed

Set an array with feed authors

addAuthors(array $authors) : \Zend\Feed\Writer\AbstractFeed
Inherited
see

Parameters

$authors

array

Returns

\Zend\Feed\Writer\AbstractFeed

Set an array of feed categories

addCategories(array $categories) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$categories

array

Returns

\Zend\Feed\Writer\AbstractFeed

Add a feed category

addCategory(array $category) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$category

array

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

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

addEntry(\Zend\Feed\Writer\Entry $entry) : \Zend\Feed\Writer\Feed

Parameters

$entry

\Zend\Feed\Writer\Entry

Returns

\Zend\Feed\Writer\Feed

Add a Pubsubhubbub hub endpoint URL

addHub(string $url) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$url

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Add Pubsubhubbub hub endpoint URLs

addHubs(array $urls) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$urls

array

Returns

\Zend\Feed\Writer\AbstractFeed

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

addTombstone(\Zend\Feed\Writer\Deleted $deleted) : void

Parameters

$deleted

\Zend\Feed\Writer\Deleted

Get the number of feed entries.

count() : integer

Required by the Iterator interface.

Returns

integer

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.

createEntry() : \Zend\Feed\Writer\Entry

Returns

\Zend\Feed\Writer\Entry

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.

createTombstone() : \Zend\Feed\Writer\Deleted

Returns

\Zend\Feed\Writer\Deleted

Return the current entry

current() : \Zend\Feed\Writer\Entry

Returns

\Zend\Feed\Writer\Entry

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

export(string $type, boolean $ignoreExceptions = false) : string

Parameters

$type

string

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

$ignoreExceptions

boolean

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

string

Get a single author

getAuthor(integer $index = 0) : string | null
Inherited

Parameters

$index

integer

Returns

stringnull

Get an array with feed authors

getAuthors() : array
Inherited

Returns

array

Get the feed's base url

getBaseUrl() : string | null
Inherited

Returns

stringnull

Get the feed categories

getCategories() : string | null
Inherited

Returns

stringnull

Get the copyright entry

getCopyright() : string | null
Inherited

Returns

stringnull

Get the feed creation date

getDateCreated() : string | null
Inherited

Returns

stringnull

Get the feed modification date

getDateModified() : string | null
Inherited

Returns

stringnull

Get the feed description

getDescription() : string | null
Inherited

Returns

stringnull

Get the feed character encoding

getEncoding() : string | null
Inherited

Returns

stringnull

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

getEntry(integer $index = 0

Parameters

$index

integer

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Get the feed generator entry

getGenerator() : string | null
Inherited

Returns

stringnull

Get the URLs used as Pubsubhubbub hubs endpoints

getHubs() : string | null
Inherited

Returns

stringnull

Get the feed ID

getId() : string | null
Inherited

Returns

stringnull

Get the feed image URI

getImage() : array
Inherited

Returns

array

Get the feed language

getLanguage() : string | null
Inherited

Returns

stringnull

Get the feed last-build date

getLastBuildDate() : string | null
Inherited

Returns

stringnull

Get the feed title

getTitle() : string | null
Inherited

Returns

stringnull

Retrieve the current or last feed type exported.

getType() : string
Inherited

Returns

stringValue will be "rss" or "atom"

Return the current feed key

key() : mixed

Returns

mixed

Move the feed pointer forward

next() : 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.

orderByDate() : \Zend\Feed\Writer\Feed

Using this method will alter the original indexation.

Returns

\Zend\Feed\Writer\Feed

Unset a specific data point

remove(string $name) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$name

string

Returns

\Zend\Feed\Writer\AbstractFeed

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

removeEntry(integer $index) : \Zend\Feed\Writer\Feed

Parameters

$index

integer

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Feed

Resets the instance and deletes all data

reset() : void
Inherited

Reset the pointer in the feed object

rewind() : void

Set the feed's base URL

setBaseUrl(string $url) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$url

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the copyright entry

setCopyright(string $copyright) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$copyright

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed creation date

setDateCreated($date = null) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$date

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed modification date

setDateModified($date = null) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$date

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed description

setDescription(string $description) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$description

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed character encoding

setEncoding(string $encoding) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$encoding

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed generator entry

setGenerator(array|string $name, null|string $version = null, null|string $uri = null) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$name

arraystring

$version

nullstring

$uri

nullstring

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

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

setId(string $id) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$id

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

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.

setImage(array $data) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$data

array

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed language

setLanguage(string $language) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$language

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

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

setLastBuildDate($date = null) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$date

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

Set the feed title

setTitle(string $title) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$title

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\AbstractFeed

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.

setType(string $type) : \Zend\Feed\Writer\AbstractFeed
Inherited

Parameters

$type

string

Returns

\Zend\Feed\Writer\AbstractFeed

Check to see if the iterator is still valid

valid() : boolean

Returns

boolean

Load extensions from Zend\Feed\Writer\Writer

_loadExtensions() : void
Inherited

Exceptions

\Zend\Feed\Writer\Exception\RuntimeException

Validate a URI using the tag scheme (RFC 4151)

_validateTagUri(string $id) : boolean
Inherited

Parameters

$id

string

Returns

boolean

 Properties

 

Contains all Feed level date to append in feed output

$data : array

Default

array()
 

Contains all entry objects

$entries : array

Default

array()
 

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

$entriesKey : integer

Default

0
 

$extensions

$extensions : 

Default

 

Holds the value "atom" or "rss" depending on the feed type set when when last exported.

$type : string

Default

null