API Documentation

Feed/Atom.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Feed
version
$Id: Atom.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Feed_Atom

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Feed_Atom

Extends from
Zend_Feed_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Feed
Properties
$_entryClassName
$_entryElementName
$_defaultNamespace
Methods
__wakeup
link
__get
_mapFeedHeaders
_mapFeedEntries
saveXml
send

Description

Atom feed class

The Zend_Feed_Atom class is a concrete subclass of the general Zend_Feed_Abstract class, tailored for representing an Atom feed. It shares all of the same methods with its abstract parent. The distinction is made in the format of data that Zend_Feed_Atom expects, and as a further pointer for users as to what kind of feed object they have been passed.

Properties

$_defaultNamespace

string $_defaultNamespace = 'atom'

The default namespace for Atom feeds.

Details

$_defaultNamespace
string
visibility
protected
default
atom
final
false
static
false

$_entryClassName

string $_entryClassName = 'Zend_Feed_Entry_Atom'

The classname for individual feed elements.

Details

$_entryClassName
string
visibility
protected
default
Zend_Feed_Entry_Atom
final
false
static
false

$_entryElementName

string $_entryElementName = 'entry'

The element name for individual feed elements (Atom <entry> elements).

Details

$_entryElementName
string
visibility
protected
default
entry
final
false
static
false

Methods

__get

__get( string $var ) : mixed

Make accessing some individual elements of the feed easier.

Special accessors 'entry' and 'entries' are provided so that if you wish to iterate over an Atom feed's entries, you can do so using foreach ($feed->entries as $entry) or foreach ($feed->entry as $entry).

Arguments
$var
string
The property to access.
Output
mixed
Details
visibility
public
final
false
static
false

__wakeup

__wakeup( ) : void

Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.

Details
visibility
public
final
false
static
false
throws

_mapFeedEntries

_mapFeedEntries( DOMElement $root, array $array ) : void

Generate the entries of the feed when working in write mode

The following nodes are constructed for each feed entry url to feed entry entry title last update

short text long version, can contain html

Arguments
$root
DOMElement
the root node to use
$array
array
the data to use
Details
visibility
protected
final
false
static
false

_mapFeedHeaders

_mapFeedHeaders( array $array ) : DOMElement

Generate the header of the feed when working in write mode

Arguments
$array
array
the data to use
Output
DOMElement
root node
Details
visibility
protected
final
false
static
false

link

link( string $rel = null ) : mixed

Easy access to <link> tags keyed by "rel" attributes.

If $elt->link() is called with no arguments, we will attempt to return the value of the tag(s) like all other method-syntax attribute access. If an argument is passed to link(), however, then we will return the "href" value of the first tag that has a "rel" attribute matching $rel:

$elt->link(): returns the value of the link tag. $elt->link('self'): returns the href from the first in the entry.

Arguments
$rel
string
The &quot;rel&quot; attribute to look for.
Output
mixed
Details
visibility
public
final
false
static
false

saveXml

saveXml( ) : string

Override Zend_Feed_Element to allow formated feeds

Output
string
Details
visibility
public
final
false
static
false

send

send( ) : void

Send feed to a http client with the correct header

Details
visibility
public
final
false
static
false
throws
if headers have already been sent
Documentation was generated by DocBlox.