Feed
Implements ArrayAccess, CountableClass 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
string
The name of the property.
Response
mixed
__set
Magic method to set values for feed properties.
__set( name, value) :
since |
3.1.4 |
---|
Arguments
- name
string
The name of the property.- value
mixed
The 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
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( name, email, uri = null, 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() :
This method is here to implement the Countable interface. You can call it by doing count($feed) rather than $feed->count();
Response
int
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( offset) :
see | ArrayAccess::offsetExists() |
---|---|
since |
3.1.4 |
Arguments
- offset
mixed
An offset to check for.
Response
bool
offsetGet
Returns the value at specified offset.
offsetGet( offset) :
see | 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( offset, \Joomla\CMS\Feed\FeedEntry value) :
see | ArrayAccess::offsetSet() |
---|---|
since |
3.1.4 |
throws |
|
Arguments
- offset
mixed
The offset to assign the value to.- value
FeedEntry
The JFeedEntry to set.
Response
bool
offsetUnset
Unsets an offset.
offsetUnset( offset) :
see | ArrayAccess::offsetUnset() |
---|---|
since |
3.1.4 |
Arguments
- offset
mixed
The offset to unset.
Response
void
removeCategory
Method to remove a category from the feed object.
removeCategory( name) : \Joomla\CMS\Feed\Feed
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( name, email, uri = null, 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
author
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>
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
publishedDate
title
A human readable title for the feed.
Type(s)
string
updatedDate
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>