API Documentation

Feed/Entry/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_Entry_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_Entry_Atom

Extends from
Zend_Feed_Entry_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
Constants
CONTENT_TYPE
Properties
$_rootElement
$_rootNamespace
Methods
delete
save
link

Description

Concrete class for working with Atom entries.

Constants

CONTENT_TYPE

 CONTENT_TYPE = 'application/atom+xml'

Content-Type

Details

value
application/atom+xml

Properties

$_rootElement

string $_rootElement = 'entry'

Root XML element for Atom entries.

Details

$_rootElement
string
visibility
protected
default
entry
final
false
static
false

$_rootNamespace

string $_rootNamespace = 'atom'

Root namespace for Atom entries.

Details

$_rootNamespace
string
visibility
protected
default
atom
final
false
static
false

Methods

delete

delete( ) : void

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.

Details
visibility
public
final
false
static
false
throws

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

save

save( string $postUri = null ) : void

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

Arguments
$postUri
string
Location to POST for creating new entries.
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.