Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 580 → Rev 612

/trunk/widget/modules/photo/bibliotheque/xml_feed_parser/1.0.4/parsers/XmlFeedParserRss11.php/RSS11.php
31,8 → 31,7
* @todo Support for RDF:List
* @todo Ensure xml:lang is accessible to users
*/
class XML_Feed_Parser_RSS11 extends XML_Feed_Parser_Type
{
class XmlFeedParserRss11 extends XmlFeedParserType {
/**
* The URI of the RelaxNG schema used to (optionally) validate the feed
* @var string
55,7 → 54,7
* The class used to represent individual items
* @var string
*/
protected $itemClass = 'XML_Feed_Parser_RSS1Element';
protected $itemClass = 'XmlFeedParserRss11Element';
/**
* The element containing entries
118,8 → 117,7
* @param DOMDocument $xml A DOM object representing the feed
* @param bool (optional) $string Whether or not to validate this feed
*/
function __construct(DOMDocument $model, $strict = false)
{
function __construct(DOMDocument $model, $strict = false) {
$this->model = $model;
 
if ($strict) {
147,8 → 145,7
* @param string $id any valid ID.
* @return XML_Feed_Parser_RSS1Element
*/
function getEntryById($id)
{
function getEntryById($id) {
if (isset($this->idMappings[$id])) {
return $this->entries[$this->idMappings[$id]];
}
167,8 → 164,7
*
* @return array|false an array simply containing the child elements
*/
protected function getImage()
{
protected function getImage() {
$images = $this->model->getElementsByTagName('image');
if ($images->length > 0) {
$image = $images->item(0);
201,8 → 197,7
*
* @return array|false
*/
protected function getTextInput()
{
protected function getTextInput() {
$inputs = $this->model->getElementsByTagName('textinput');
if ($inputs->length > 0) {
$input = $inputs->item(0);
240,8 → 235,7
*
* @return array|false
*/
function getAuthor()
{
function getAuthor() {
$options = array('creator', 'contributor', 'publisher');
foreach ($options as $element) {
$test = $this->model->getElementsByTagName($element);
260,8 → 254,7
*
* @return string
*/
function getLink($offset = 0, $attribute = 'href', $params = false)
{
function getLink($offset = 0, $attribute = 'href', $params = false) {
$links = $this->model->getElementsByTagName('link');
if ($links->length <= $offset) {
return false;
270,5 → 263,4
return $this->addBase($link->nodeValue, $link);
}
}
 
?>
?>