package Default

 Methods

Method overloading: call given method on first extension implementing it

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

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() 

Set a single author

addAuthor(array $author) : \Zend\Feed\Writer\Entry

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\Entry

Set an array with feed authors

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

Parameters

$authors

array

Returns

\Zend\Feed\Writer\Entry

Set an array of entry categories

addCategories(array $categories) : \Zend\Feed\Writer\Entry

Parameters

$categories

array

Returns

\Zend\Feed\Writer\Entry

Add an entry category

addCategory(array $category) : \Zend\Feed\Writer\Entry

Parameters

$category

array

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Creates a new Zend\Feed\Writer\Source 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.

createSource() : \Zend\Feed\Writer\Source

Returns

\Zend\Feed\Writer\Source

Get an array with feed authors

getAuthors() : array

Returns

array

Get the entry categories

getCategories() : string | null

Returns

stringnull

Get the number of comments/replies for current entry

getCommentCount() : integer

Returns

integer

Get the entry content

getContent() : string

Returns

string

Get the entry copyright information

getCopyright() : string

Returns

string

Get the entry creation date

getDateCreated() : string

Returns

string

Get the entry modification date

getDateModified() : string

Returns

string

Get the entry description

getDescription() : string

Returns

string

Retrieve an array of all enclosures to be added to entry.

getEnclosure() : array

Returns

array

Get the feed character encoding

getEncoding() : string | null

Returns

stringnull

Return an Extension object with the matching name (postfixed with _Entry)

getExtension(string $name) : object

Parameters

$name

string

Returns

object

Get registered extensions

getExtensions() : array

Returns

array

Get the entry ID

getId() : string

Returns

string

getSource()

getSource() : \Zend\Feed\Writer\Source

Returns

\Zend\Feed\Writer\Source

Get the entry title

getTitle() : string

Returns

string

Retrieve the current or last feed type exported.

getType() : string

Returns

stringValue will be "rss" or "atom"

Unset a specific data point

remove(string $name) : \Zend\Feed\Writer\Entry

Parameters

$name

string

Returns

\Zend\Feed\Writer\Entry

Set the number of comments associated with this entry

setCommentCount(integer $count) : \Zend\Feed\Writer\Entry

Parameters

$count

integer

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the entry's content

setContent(string $content) : \Zend\Feed\Writer\Entry

Parameters

$content

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the copyright entry

setCopyright(string $copyright) : \Zend\Feed\Writer\Entry

Parameters

$copyright

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the feed creation date

setDateCreated(null|integer|\DateTime $date = null) : \Zend\Feed\Writer\Entry

Parameters

$date

nullinteger\DateTime

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the feed modification date

setDateModified(null|integer|\DateTime $date = null) : \Zend\Feed\Writer\Entry

Parameters

$date

nullinteger\DateTime

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the feed description

setDescription(string $description) : \Zend\Feed\Writer\Entry

Parameters

$description

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Adds an enclosure to the entry. The array parameter may contain the keys 'uri', 'type' and 'length'. Only 'uri' is required for Atom, though the others must also be provided or RSS rendering (where they are required) will throw an Exception.

setEnclosure(array $enclosure) : \Zend\Feed\Writer\Entry

Parameters

$enclosure

array

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the feed character encoding

setEncoding(string $encoding) : \Zend\Feed\Writer\Entry

Parameters

$encoding

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

Set the feed ID

setId(string $id) : \Zend\Feed\Writer\Entry

Parameters

$id

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

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

setSource(\Zend\Feed\Writer\Source $source) : \Zend\Feed\Writer\Entry

Parameters

$source

\Zend\Feed\Writer\Source

Returns

\Zend\Feed\Writer\Entry

Set the feed title

setTitle(string $title) : \Zend\Feed\Writer\Entry

Parameters

$title

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

\Zend\Feed\Writer\Entry

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\Entry

Parameters

$type

string

Returns

\Zend\Feed\Writer\Entry

Load extensions from Zend\Feed\Writer\Writer

_loadExtensions() : void

 Properties

 

Internal array containing all data associated with this entry or item.

$data : array

Default

array()
 

Registered extensions

$extensions : array

Default

array()
 

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

$type : string

Default

null