Zend_Feed_Entry_Abstract represents a single entry in an Atom or RSS feed.

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_Element

 Methods

Get the value of an element with method syntax.

__call(string $var, mixed $unused) : mixed
Inherited

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.

Parameters

$var

string

The element to get the string value of.

$unused

mixed

This parameter is not used.

Returns

mixedThe node's value, null, or an array of nodes.

Zend_Feed_Entry_Abstract constructor

__construct(string $uri = null, \SimpleXMLElement|\DOMNode|string $element = null) : void

The Zend_Feed_Entry_Abstract constructor takes the URI of the feed the entry is part of, and optionally an XML construct (usually a SimpleXMLElement, but it can be an XML string or a DOMNode as well) that contains the contents of the entry.

inherited_from \Zend_Feed_Element::__construct()

Parameters

$uri

string

$element

\SimpleXMLElement\DOMNodestring

Exceptions

\Zend_Feed_Exception

Zend_Feed_Element constructor.

__construct(\DOMElement $element = null) : void
Inherited

Parameters

$element

\DOMElement

The DOM element we're encapsulating.

Map variable access onto the underlying entry representation.

__get(string $var) : mixed
Inherited

Get-style access returns a Zend_Feed_Element representing the child element accessed. To get string values, use method syntax with the __call() overriding.

Parameters

$var

string

The property to access.

Returns

mixed

Map isset calls onto the underlying entry representation.

__isset(string $var) : boolean
Inherited

Parameters

$var

string

Returns

boolean

Map variable sets onto the underlying entry representation.

__set(string $var, string $val) : void
Inherited

Parameters

$var

string

The property to change.

$val

string

The property's new value.

Exceptions

\Zend_Feed_Exception

Returns the nodeValue of this element when this object is used in a string context.

__toString() : string
Inherited

Returns

string

Remove all children matching $var.

__unset(string $var) : void
Inherited

Parameters

$var

string

Get a DOM representation of the element

getDOM() : \DOMDocument
Inherited

Returns the underlying DOM object, which can then be manipulated with full DOM methods.

Returns

\DOMDocument

Get encoding

getEncoding() : string
Inherited

Returns

string

Required by the ArrayAccess interface.

offsetExists(string $offset) : boolean
Inherited

Parameters

$offset

string

Returns

boolean

Required by the ArrayAccess interface.

offsetGet(string $offset) : string
Inherited

Parameters

$offset

string

Returns

string

Required by the ArrayAccess interface.

offsetSet(string $offset, string $value) : string
Inherited

Parameters

$offset

string

$value

string

Returns

string

Required by the ArrayAccess interface.

offsetUnset(string $offset) : boolean
Inherited

Parameters

$offset

string

Returns

boolean

Get an XML string representation of this element

saveXml() : string
Inherited

Returns a string of this element's XML, including the XML prologue.

Returns

string

Get the XML for only this element

saveXmlFragment() : string
Inherited

Returns a string of this element's XML without prologue.

Returns

string

Update the object from a DOM element

setDOM(\DOMElement $element) : void
Inherited

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.

Parameters

$element

\DOMElement

Set encoding

setEncoding(string $value) : \Zend_Feed_Element
Inherited

Parameters

$value

string

Encoding to use

Returns

\Zend_Feed_Element

Set the parent element of this object to another Zend_Feed_Element.

setParent(\Zend_Feed_Element $element) : void
Inherited

Parameters

$element

\Zend_Feed_Element

Finds children with tagnames matching $var

_children(string $var) : array
Inherited

Similar to SimpleXML's children() method.

Parameters

$var

string

Tagname to match, can be either namespace:tagName or just tagName.

Returns

array

Appends this element to its parent if necessary.

ensureAppended() : void
Inherited

 Properties

 

$_appended

$_appended : boolean

Default

true
 

$_element

$_element : \DOMElement

Default

 

Character encoding to utilize

$_encoding : string

Default

'UTF-8'
 

$_parentElement

$_parentElement : \Zend_Feed_Element

Default

 

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

$_rootElement : string

Default

 

Root namespace for entries. Subclasses may define this to a non-null value.

$_rootNamespace : string

Default

null