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
ファイルを表示 Open project: contao/core-bundle

Protected Properties

Property Type Description
$arrData array Data

Public Methods

Method 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 method

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

__get() public method

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

__isset() public method

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

__set() public method

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

addEnclosure() public method

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
return array