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

Set an array with feed authors

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

see \Zend\Feed\Writer\addAuthor

Parameters

$authors

array

Returns

Set an array of entry categories

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

Parameters

$categories

array

Returns

Add a entry category

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

Creates a new Zend\Feed\Writer\Source data container for use.

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

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

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

Returns

int

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

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

Set the number of comments associated with this entry

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

Set the entry's content

setContent(string $content) : \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

Set the feed creation date

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

Set the feed modification date

setDateModified(null | int | \DateTime $date) : \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

Adds an enclosure to the entry.

setEnclosure(array $enclosure) : \Zend\Feed\Writer\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.

Parameters

$enclosure

array

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

Set the feed character encoding

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

Parameters

$encoding

string

Exceptions

\Zend\Feed\Writer\Exception\InvalidArgumentException

Returns

Set the feed ID

setId(string $id) : \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

Set the feed title

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

Set the current feed type being exported to "rss" or "atom".

setType(string $type) : \Zend\Feed\Writer\Entry

This allows other objects to gracefully choose whether to execute or not, depending on their appropriateness for the current type, e.g. renderers.

Parameters

$type

string

Returns

Load extensions from Zend\Feed\Writer\Writer

_loadExtensions() : void

 Properties

 

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

$data : array

 

Registered extensions

$extensions : array

 

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

$type : string