Apache Zeta Components Manual :: File Source for entry.php
Source for file entry.php
Documentation is available at entry.php
* File containing the ezcFeedEntryElement class.
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* @version //autogentag//
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* Class defining a feed entry.
* @property array(ezcFeedPersonElement) $author
* The authors of the entry. Equivalents:
* ATOM-author (required, multiple),
* RSS2-author (optional, recommended, single).
* @property array(ezcFeedCategoryElement) $category
* The categories of the entry. Equivalents:
* ATOM-author (optional, multiple),
* RSS2-category (optional, multiple).
* @property ezcFeedTextElement $comments
* The comments of the entry. Equivalents:
* RSS2-author (optional, single).
* @property ezcFeedContentElement $content
* The complex text content of the entry. Equivalents:
* ATOM-content (optional, single),
* @property array(ezcFeedPersonElement) $contributor
* The contributors of the entry. Equivalents:
* ATOM-contributor (optional, not recommended, multiple),
* @property ezcFeedTextElement $copyright
* The copyright of the entry. Equivalents:
* ATOM-rights (optional, single),
* @property ezcFeedTextElement $description
* The description of the entry. Equivalents:
* ATOM-summary (required, single),
* RSS1-description (required, single),
* RSS2-description (required, single).
* @property array(ezcFeedEnclosureElement) $enclosure
* The enclosures of the entry. Equivalents:
* ATOM-link@rel="enclosure" (optional, multiple),
* RSS2-enclosure (optional, single).
* @property ezcFeedTextElement $id
* The id of the entry. Equivalents:
* ATOM-id (required, single),
* RSS1-about (required, single),
* RSS2-guid (optional, single).
* @property array(ezcFeedLinkElement) $link
* The links of the entry. Equivalents:
* ATOM-link (required, multiple),
* RSS1-link (required, single),
* RSS2-link (required, single).
* @property ezcFeedDateElement $published
* The published date of the entry. Equivalents:
* ATOM-published (optional, single),
* RSS2-pubDate (optional, single).
* @property ezcFeedTextElement $title
* The title of the entry. Equivalents:
* ATOM-title (required, single),
* RSS1-title (required, single),
* RSS2-title (required, single).
* @property ezcFeedDateElement $updated
* The updated date of the entry. Equivalents:
* ATOM-updated (required, single),
* @property ezcFeedSourceElement $source
* The source of the entry. Equivalents:
* ATOM-source (optional, not recommended, single),
* RSS2-source (optional, not recommended, single).
* @property ezcFeedTextElement $language
* The language of the entry. Equivalents:
* ATOM-source (optional, not recommended, single ),
* @version //autogentag//
* Holds the modules used by this feed item.
* @var array(string=>ezcFeedModule)
private $modules =
array();
* Sets the property $name to $value.
* @param string $name The property name
* @param mixed $value The property value
public function __set( $name, $value )
$element =
$this->add( $name );
$element =
$this->add( $name );
$element =
$this->add( $name );
$element =
$this->add( $name );
$element =
$this->add( $name );
$element =
$this->add( $name );
$element =
$this->add( $name );
$element =
$this->add( $name );
$element->source =
$value;
if ( isset
( $supportedModules[$name] ) )
$this->modules[$name] =
$value;
* Returns the value of property $name.
* @throws ezcFeedUndefinedModuleException
* if trying to fetch a module not defined yet
* @param string $name The property name
public function __get( $name )
if ( isset
( $supportedModules[$name] ) )
if ( isset
( $this->$name ) )
return $this->modules[$name];
* Returns if the property $name is set.
* @param string $name The property name
public function __isset( $name )
if ( isset
( $supportedModules[$name] ) )
return isset
( $this->modules[$name] );
* Adds a new element with name $name to the feed item and returns it.
* // $item is an ezcFeedEntryElement object
* $link = $item->add( 'link' );
* $link->href = 'http://ez.no/';
* @throws ezcFeedUnsupportedElementException
* if the element $name is not supported
* @apichange All items are not encoded at all, in future versions this
* should be done in one of the ways as described in
* http://issues.ez.no/14093
* @param string $name The name of the element to add
public function add( $name )
* Adds a new module to this item and returns it.
* @param string $name The name of the module to add
* Returns true if the module $name is loaded, false otherwise.
* @param string $name The name of the module to check if loaded for this item
return isset
( $this->modules[$name] );
* Returns an array with all the modules defined for this feed item.
* @return array(ezcFeedModule)