Feed

Implements ArrayAccess, Countable

Class to encapsulate a feed for the Joomla Platform.

since

3.1.4

package

Joomla CMS

Methods

__get

Magic method to return values for feed properties.

__get( name) : 
since

3.1.4

Arguments

name

stringThe name of the property.

Response

mixed

__set

Magic method to set values for feed properties.

__set( name,  value) : 
since

3.1.4

Arguments

name

stringThe name of the property.

value

mixedThe value to set for the property.

Response

void

addCategory

Method to add a category to the feed object.

addCategory( name,  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

Feed

addContributor

Method to add a contributor to the feed object.

addContributor( name,  email,  uri = null,  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

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

FeedEntryThe entry object to add.

Response

Feed

count

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

count() : 

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( offset) : 
see ArrayAccess::offsetExists()
since

3.1.4

Arguments

offset

mixedAn offset to check for.

Response

bool

offsetGet

Returns the value at specified offset.

offsetGet( offset) : 
see 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( offset, \Joomla\CMS\Feed\FeedEntry value) : 
see ArrayAccess::offsetSet()
since

3.1.4

throws

InvalidArgumentException

Arguments

offset

mixedThe offset to assign the value to.

value

FeedEntryThe JFeedEntry to set.

Response

bool

offsetUnset

Unsets an offset.

offsetUnset( offset) : 
see ArrayAccess::offsetUnset()
since

3.1.4

Arguments

offset

mixedThe offset to unset.

Response

void

removeCategory

Method to remove a category from the feed object.

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

3.1.4

Arguments

name

stringThe name of the category to remove.

Response

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

FeedPersonThe person object to remove.

Response

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

FeedEntryThe entry object to remove.

Response

Feed

reverseItems

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

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

3.1.4

Response

Feed

setAuthor

Shortcut method to set the author for the feed object.

setAuthor( name,  email,  uri = null,  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

Feed

Properties

author

Person responsible for feed content.

Type(s)

FeedPerson

categories

Categories to which the feed belongs.

Type(s)

array<string|int, mixed>

contributors

People who contributed to the feed content.

Type(s)

array<string|int, mixed>

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

properties

The entry properties.

since

3.1.4

Type(s)

array<string|int, mixed>

entries

The list of feed entry objects.

since

3.1.4

Type(s)

array<string|int, mixed>