## Zend_Feed_EntryAtom

Description

Concrete class for working with Atom entries.

- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Feed/EntryAtom.php (line 34)

    Zend_Feed_Element
       |
       --Zend_Feed_EntryAbstract
          |
          --Zend_Feed_EntryAtom

Variable Summary
string $_rootElement
string $_rootNamespace
Method Summary
void delete ()
mixed link ([string $rel = null])
void save ([string $postUri = null])
Variables
string $_rootElement = 'entry' (line 41)

Root XML element for Atom entries.

- access: protected

Redefinition of:

Zend_Feed_EntryAbstract::$_rootElement
  Root XML element for entries. Subclasses must define this to a non-null value.

string $_rootNamespace = 'atom' (line 48)

Root namespace for Atom entries.

- access: protected

Redefinition of:

Zend_Feed_EntryAbstract::$_rootNamespace
  Root namespace for entries. Subclasses may define this to a non-null value.

#### Inherited Variables

Inherited from Zend_Feed_Element

> Zend_Feed_Element::$_appended
> Zend_Feed_Element::$_element
> Zend_Feed_Element::$_parentElement

Methods
delete (line 65)

Delete an atom entry.

Delete tries to delete this entry from its feed. If the entry does not contain a link rel="edit", we throw an error (either the entry does not yet exist or this is not an editable feed). If we have a link rel="edit", we do the empty-body HTTP DELETE to that URI and check for a response of 2xx. Usually the response would be 204 No Content, but the Atom Publishing Protocol permits it to be 200 OK.

- access: public
- throws: Zend_Feed_Exception If an error occurs, an Zend_Feed_Exception will be thrown.

void delete ()
link (line 201)

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 <link> 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 <link> 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 <link rel="self"> in the entry.

- access: public

mixed link ([string $rel = null])

- string $rel: The "rel" attribute to look for.

save (line 122)

Save a new or updated Atom entry.

Save is used to either create new entries or to save changes to existing ones. If we have a link rel="edit", we are changing an existing entry. In this case we re-serialize the entry and PUT it to the edit URI, checking for a 200 OK result.

For posting new entries, you must specify the $postUri parameter to save() to tell the object where to post itself. We use $postUri and POST the serialized entry there, checking for a 201 Created response. If the insert is successful, we then parse the response from the POST to get any values that the server has generated: an id, an updated time, and its new link rel="edit".

- access: public
- throws: Zend_Feed_Exception If an error occurs, a Zend_Feed_Exception will be thrown.

void save ([string $postUri = null])

- string $postUri: Location to POST for creating new entries.

#### Inherited Methods

Inherited From Zend_Feed_EntryAbstract

> Zend_Feed_EntryAbstract::__construct()

Inherited From Zend_Feed_Element

> Zend_Feed_Element::__construct()
> Zend_Feed_Element::ensureAppended()
> Zend_Feed_Element::getDOM()
> Zend_Feed_Element::offsetExists()
> Zend_Feed_Element::offsetGet()
> Zend_Feed_Element::offsetSet()
> Zend_Feed_Element::offsetUnset()
> Zend_Feed_Element::saveXML()
> Zend_Feed_Element::saveXMLFragment()
> Zend_Feed_Element::setDOM()
> Zend_Feed_Element::setParent()
> Zend_Feed_Element::_children()
> Zend_Feed_Element::__call()
> Zend_Feed_Element::__get()
> Zend_Feed_Element::__isset()
> Zend_Feed_Element::__set()
> Zend_Feed_Element::__toString()
> Zend_Feed_Element::__unset()

Documentation generated on Wed, 21 Feb 2007 11:47:10 -0800 by phpDocumentor 1.3.1