PHP Class Contao\FeedItem

The class provides an interface to create RSS or Atom feed items. You can then add the items to a Feed object. Usage: $feed = new Feed('news'); $feed->title = 'News feed'; $item = new FeedItem(); $item->title = 'Latest news'; $item->author = 'Leo Feyer'; $feed->addItem($item); echo $feed->generateRss();
Inheritance: extends System
Afficher le fichier Open project: contao/core-bundle

Protected Properties

Свойство Type Description
$arrData array Data

Méthodes publiques

Méthode Description
__construct ( array $arrData = null ) Set the data from an array
__get ( string $strKey ) : mixed | null Return an object property
__isset ( string $strKey ) : boolean Check whether a property is set
__set ( string $strKey, mixed $varValue ) Set an object property
addEnclosure ( string $strFile, string $strUrl = null ) Add an enclosure

Method Details

__construct() public méthode

Set the data from an array
public __construct ( array $arrData = null )
$arrData array An optional data array

__get() public méthode

Return an object property
public __get ( string $strKey ) : mixed | null
$strKey string The property name
Résultat mixed | null The property value

__isset() public méthode

Check whether a property is set
public __isset ( string $strKey ) : boolean
$strKey string The property name
Résultat boolean True if the property is set

__set() public méthode

Set an object property
public __set ( string $strKey, mixed $varValue )
$strKey string The property name
$varValue mixed The property value

addEnclosure() public méthode

Add an enclosure
public addEnclosure ( string $strFile, string $strUrl = null )
$strFile string The file path
$strUrl string The base URL

Property Details

$arrData protected_oe property

Data
protected array $arrData
Résultat array