Class Zend_Feed_EntryAtom

Description

Concrete class for working with Atom entries.

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

Located in /Feed/EntryAtom.php (line 38)

Zend_Feed_Element
   |
   --Zend_Feed_EntryAbstract
      |
      --Zend_Feed_EntryAtom
Variable Summary
Method Summary
 void delete ()
 mixed link ([string $rel = null])
 void save ([string $postUri = null])
Variables
string $_rootElement = 'entry' (line 45)

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 52)

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 69)

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.

  • throws: Zend_Feed_Exception
  • access: public
void delete ()
link (line 203)

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 124)

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".

  • throws: Zend_Feed_Exception
  • access: public
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 Sat, 05 May 2007 11:54:14 -0700 by phpDocumentor 1.3.2