Concrete class for working with Atom entries.
category | Zend |
---|---|
package | Zend_Feed |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Feed_Entry_Abstract |
__call(string $var, mixed $unused) : mixed
Map method calls to get the string value of the requested element. If there are multiple elements that match, this will return an array of those objects.
string
The element to get the string value of.
mixed
This parameter is not used.
mixed
The node's value, null, or an array of nodes.__construct(\DOMElement $element = null
) : void
\DOMElement
The DOM element we're encapsulating.
__get(string $var) : mixed
Get-style access returns a Zend_Feed_Element representing the child element accessed. To get string values, use method syntax with the __call() overriding.
string
The property to access.
mixed
__isset(string $var) : boolean
string
boolean
__set(string $var, string $val) : void
string
The property to change.
string
The property's new value.
\Zend_Feed_Exception |
---|
__toString() : string
string
__unset(string $var) : void
string
delete() : void
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.
\Zend_Feed_Exception |
---|
getDOM() : \DOMDocument
Returns the underlying DOM object, which can then be manipulated with full DOM methods.
\DOMDocument
getEncoding() : string
string
link(string $rel = null
) : mixed
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.
string
The "rel" attribute to look for.
mixed
offsetExists(string $offset) : boolean
string
boolean
offsetGet(string $offset) : string
string
string
offsetSet(string $offset, string $value) : string
string
string
string
offsetUnset(string $offset) : boolean
string
boolean
save(string $postUri = null
) : void
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".
string
Location to POST for creating new entries.
\Zend_Feed_Exception |
---|
saveXml() : string
Returns a string of this element's XML, including the XML prologue.
string
saveXmlFragment() : string
Returns a string of this element's XML without prologue.
string
setDOM(\DOMElement $element) : void
Take a DOMElement object, which may be originally from a call to getDOM() or may be custom created, and use it as the DOM tree for this Zend_Feed_Element.
\DOMElement
setEncoding(string $value) : \Zend_Feed_Element
string
Encoding to use
\Zend_Feed_Element
setParent(\Zend_Feed_Element $element) : void
\Zend_Feed_Element
_children(string $var) : array
Similar to SimpleXML's children() method.
string
Tagname to match, can be either namespace:tagName or just tagName.
array
ensureAppended() : void
$_appended : boolean
true
$_element : \DOMElement
$_encoding : string
'UTF-8'
$_parentElement : \Zend_Feed_Element
$_rootElement : string
'entry'
inherited_from | \Zend_Feed_Entry_Abstract::_rootElement |
---|
$_rootElement : string
$_rootNamespace : string
'atom'
inherited_from | \Zend_Feed_Entry_Abstract::_rootNamespace |
---|
$_rootNamespace : string
null
CONTENT_TYPE = 'application/atom+xml'