Feed

Implements \ArrayAccess, \Countable

Class to encapsulate a feed for the Joomla Platform.

since

3.1.4

package

Application

Methods

__get

Magic method to return values for feed properties.

__get(string name) : mixed
since

3.1.4

Arguments

name

stringThe name of the property.

Response

mixed

__set

Magic method to set values for feed properties.

__set(string name, mixed value) : void
since

3.1.4

Arguments

name

stringThe name of the property.

value

mixedThe value to set for the property.

addCategory

Method to add a category to the feed object.

addCategory(string name, string uri = '') : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

name

stringThe name of the category to add.

uri

stringThe optional URI for the category to add.

Response

\Joomla\CMS\Feed\Feed

addContributor

Method to add a contributor to the feed object.

addContributor(string name, string email, string uri = null, string type = null) : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

name

stringThe full name of the person to add.

email

stringThe email address of the person to add.

uri

stringThe optional URI for the person to add.

type

stringThe optional type of person to add.

Response

\Joomla\CMS\Feed\Feed

addEntry

Method to add an entry to the feed object.

addEntry(\Joomla\CMS\Feed\FeedEntry entry) : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

entry

\Joomla\CMS\Feed\FeedEntryThe entry object to add.

Response

\Joomla\CMS\Feed\Feed

count

Returns a count of the number of entries in the feed.

count() : int

This method is here to implement the Countable interface. You can call it by doing count($feed) rather than $feed->count();

Response

intnumber of entries in the feed.

offsetExists

Whether or not an offset exists. This method is executed when using isset() or empty() on objects implementing ArrayAccess.

offsetExists(mixed offset) : bool
see \Joomla\CMS\Feed\ArrayAccess::offsetExists()
since

3.1.4

Arguments

offset

mixedAn offset to check for.

Response

bool

offsetGet

Returns the value at specified offset.

offsetGet(mixed offset) : mixed
see \Joomla\CMS\Feed\ArrayAccess::offsetGet()
since

3.1.4

Arguments

offset

mixedThe offset to retrieve.

Response

mixedThe value at the offset.

offsetSet

Assigns a value to the specified offset.

offsetSet(mixed offset, \Joomla\CMS\Feed\FeedEntry value) : bool
see \Joomla\CMS\Feed\ArrayAccess::offsetSet()
since

3.1.4

throws

\InvalidArgumentException

Arguments

offset

mixedThe offset to assign the value to.

value

\Joomla\CMS\Feed\FeedEntryThe JFeedEntry to set.

Response

bool

offsetUnset

Unsets an offset.

offsetUnset(mixed offset) : void
see \Joomla\CMS\Feed\ArrayAccess::offsetUnset()
since

3.1.4

Arguments

offset

mixedThe offset to unset.

removeCategory

Method to remove a category from the feed object.

removeCategory(string name) : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

name

stringThe name of the category to remove.

Response

\Joomla\CMS\Feed\Feed

removeContributor

Method to remove a contributor from the feed object.

removeContributor(\Joomla\CMS\Feed\FeedPerson contributor) : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

contributor

\Joomla\CMS\Feed\FeedPersonThe person object to remove.

Response

\Joomla\CMS\Feed\Feed

removeEntry

Method to remove an entry from the feed object.

removeEntry(\Joomla\CMS\Feed\FeedEntry entry) : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

entry

\Joomla\CMS\Feed\FeedEntryThe entry object to remove.

Response

\Joomla\CMS\Feed\Feed

reverseItems

Method to reverse the items if display is set to 'oldest first'

reverseItems() : \Joomla\CMS\Feed\Feed
since

3.1.4

Response

\Joomla\CMS\Feed\Feed

setAuthor

Shortcut method to set the author for the feed object.

setAuthor(string name, string email, string uri = null, string type = null) : \Joomla\CMS\Feed\Feed
since

3.1.4

Arguments

name

stringThe full name of the person to set.

email

stringThe email address of the person to set.

uri

stringThe optional URI for the person to set.

type

stringThe optional type of person to set.

Response

\Joomla\CMS\Feed\Feed

Properties

properties

The entry properties.

since

3.1.4

Type(s)

array

entries

The list of feed entry objects.

since

3.1.4

Type(s)

array

author

Person responsible for feed content.

Type(s)

FeedPerson

categories

Categories to which the feed belongs.

Type(s)

array

contributors

People who contributed to the feed content.

Type(s)

array

description

A phrase or sentence describing the feed.

Type(s)

string

generator

A string indicating the program used to generate the feed.

Type(s)

string

image

FeedLink object containing feed image properties.

Type(s)

FeedLink|null

publishedDate

The publication date for the feed content.

Type(s)

Date

title

A human readable title for the feed.

Type(s)

string

updatedDate

The last time the content of the feed changed.

Type(s)

Date

uri

Universal, permanent identifier for the feed.

Type(s)

string