Feed
Implements \ArrayAccess, \CountableClass to encapsulate a feed for the Joomla Platform.
since |
3.1.4 |
---|
Methods
__get
Magic method to return values for feed properties.
__get(string $name) : mixed
since |
3.1.4 |
---|
Arguments
- $name
string
The 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
string
The name of the property.- $value
mixed
The 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
string
The name of the category to add.- $uri
string
The optional URI for the category to add.
Response
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
string
The full name of the person to add.string
The email address of the person to add.- $uri
string
The optional URI for the person to add.- $type
string
The optional type of person to add.
Response
addEntry
Method to add an entry to the feed object.
addEntry(\Joomla\CMS\Feed\FeedEntry $entry) : \Joomla\CMS\Feed\Feed
count
Returns a count of the number of entries in the feed.
count() : integer
This method is here to implement the Countable interface. You can call it by doing count($feed) rather than $feed->count();
Response
integer
number 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) : boolean
see | \Joomla\CMS\Feed\ArrayAccess::offsetExists() |
---|---|
since |
3.1.4 |
Arguments
- $offset
mixed
An offset to check for.
Response
boolean
offsetGet
Returns the value at specified offset.
offsetGet(mixed $offset) : mixed
see | \Joomla\CMS\Feed\ArrayAccess::offsetGet() |
---|---|
since |
3.1.4 |
Arguments
- $offset
mixed
The offset to retrieve.
Response
mixed
The value at the offset.
offsetSet
Assigns a value to the specified offset.
offsetSet(mixed $offset, \Joomla\CMS\Feed\FeedEntry $value) : boolean
see | \Joomla\CMS\Feed\ArrayAccess::offsetSet() |
---|---|
since |
3.1.4 |
throws |
|
Arguments
- $offset
mixed
The offset to assign the value to.- $value
\Joomla\CMS\Feed\FeedEntry
The JFeedEntry to set.
Response
boolean
offsetUnset
Unsets an offset.
offsetUnset(mixed $offset) : void
see | \Joomla\CMS\Feed\ArrayAccess::offsetUnset() |
---|---|
since |
3.1.4 |
Arguments
- $offset
mixed
The 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
string
The name of the category to remove.
Response
removeContributor
Method to remove a contributor from the feed object.
removeContributor(\Joomla\CMS\Feed\FeedPerson $contributor) : \Joomla\CMS\Feed\Feed
removeEntry
Method to remove an entry from the feed object.
removeEntry(\Joomla\CMS\Feed\FeedEntry $entry) : \Joomla\CMS\Feed\Feed
reverseItems
Method to reverse the items if display is set to 'oldest first'
reverseItems() : \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
string
The full name of the person to set.string
The email address of the person to set.- $uri
string
The optional URI for the person to set.- $type
string
The optional type of person to set.
Response
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)
\Joomla\CMS\Feed\FeedPerson
categories
Categories to which the feed belongs.
Type(s)
array
contributors
People who contributed to the feed content.
Type(s)
array
copyright
Information about rights, e.g. copyrights, held in and over the feed.
Type(s)
string
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)
\Joomla\CMS\Feed\FeedLink|null
publishedDate
The publication date for the feed content.
Type(s)
\Joomla\CMS\Date\Date
title
A human readable title for the feed.
Type(s)
string
updatedDate
The last time the content of the feed changed.
Type(s)
\Joomla\CMS\Date\Date
uri
Universal, permanent identifier for the feed.
Type(s)
string