Class Zend_Feed_Entry_Atom

Description

Concrete class for working with Atom entries.

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

Located in /Feed/Entry/Atom.php (line 38)

Zend_Feed_Element
   |
   --Zend_Feed_Entry_Abstract
      |
      --Zend_Feed_Entry_Atom
Class Constant Summary
 CONTENT_TYPE = 'application/atom+xml'
Variable Summary
Method Summary
 void delete ()
 mixed link ([string $rel = null])
 void save ([string $postUri = null])
Variables
string $_rootElement = 'entry' (line 50)

Root XML element for Atom entries.

  • access: protected

Redefinition of:
Zend_Feed_Entry_Abstract::$_rootElement
Root XML element for entries. Subclasses must define this to a non-null value.
string $_rootNamespace = 'atom' (line 57)

Root namespace for Atom entries.

  • access: protected

Redefinition of:
Zend_Feed_Entry_Abstract::$_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::$_encoding
Zend_Feed_Element::$_parentElement
Methods
delete (line 74)

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

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

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_Entry_Abstract

 Zend_Feed_Entry_Abstract::__construct()

Inherited From Zend_Feed_Element

 Zend_Feed_Element::__construct()
 Zend_Feed_Element::ensureAppended()
 Zend_Feed_Element::getDOM()
 Zend_Feed_Element::getEncoding()
 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::setEncoding()
 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()
Class Constants
CONTENT_TYPE = 'application/atom+xml' (line 43)

Content-Type

Documentation generated on Mon, 21 Jun 2010 15:07:56 -0400 by phpDocumentor 1.4.3