Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Feed_Element Class Reference

Public Member Functions

 __construct ($element=null)
 Zend_Feed_Element constructor.
 
 getDOM ()
 Get a DOM representation of the element.
 
 setDOM (DOMElement $element)
 Update the object from a DOM element.
 
 setParent (Zend_Feed_Element $element)
 Set the parent element of this object to another Zend_Feed_Element.
 
 saveXml ()
 Get an XML string representation of this element.
 
 saveXmlFragment ()
 Get the XML for only this element.
 
 getEncoding ()
 Get encoding.
 
 setEncoding ($value)
 Set encoding.
 
 __get ($var)
 Map variable access onto the underlying entry representation.
 
 __set ($var, $val)
 Map variable sets onto the underlying entry representation.
 
 __isset ($var)
 Map isset calls onto the underlying entry representation.
 
 __call ($var, $unused)
 Get the value of an element with method syntax.
 
 __unset ($var)
 Remove all children matching $var.
 
 __toString ()
 Returns the nodeValue of this element when this object is used in a string context.
 
 offsetExists ($offset)
 Required by the ArrayAccess interface.
 
 offsetGet ($offset)
 Required by the ArrayAccess interface.
 
 offsetSet ($offset, $value)
 Required by the ArrayAccess interface.
 
 offsetUnset ($offset)
 Required by the ArrayAccess interface.
 

Protected Member Functions

 ensureAppended ()
 Appends this element to its parent if necessary.
 
 _children ($var)
 Finds children with tagnames matching $var.
 

Protected Attributes

 $_element
 
 $_encoding = 'UTF-8'
 
 $_parentElement
 
 $_appended = true
 

Constructor & Destructor Documentation

__construct (   $element = null)

Zend_Feed_Element constructor.

Parameters
DOMElement$elementThe DOM element we're encapsulating.
Returns
void

Member Function Documentation

__call (   $var,
  $unused 
)

Get the value of an element with method syntax.

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
string$varThe element to get the string value of.
mixed$unusedThis parameter is not used.
Returns
mixed The node's value, null, or an array of nodes.
__get (   $var)

Map variable access onto the underlying entry representation.

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
string$varThe property to access.
Returns
mixed
__isset (   $var)

Map isset calls onto the underlying entry representation.

Parameters
string$var
Returns
boolean
__set (   $var,
  $val 
)

Map variable sets onto the underlying entry representation.

Parameters
string$varThe property to change.
string$valThe property's new value.
Returns
void
Exceptions
Zend_Feed_Exception
See Also
Zend_Feed_Exception
__toString ( )

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

Returns
string
__unset (   $var)

Remove all children matching $var.

Parameters
string$var
Returns
void
_children (   $var)
protected

Finds children with tagnames matching $var.

Similar to SimpleXML's children() method.

Parameters
string$varTagname to match, can be either namespace:tagName or just tagName.
Returns
array
ensureAppended ( )
protected

Appends this element to its parent if necessary.

Returns
void
getDOM ( )

Get a DOM representation of the element.

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

Returns
DOMDocument
getEncoding ( )

Get encoding.

Returns
string
offsetExists (   $offset)

Required by the ArrayAccess interface.

Parameters
string$offset
Returns
boolean
offsetGet (   $offset)

Required by the ArrayAccess interface.

Parameters
string$offset
Returns
string
offsetSet (   $offset,
  $value 
)

Required by the ArrayAccess interface.

Parameters
string$offset
string$value
Returns
string
offsetUnset (   $offset)

Required by the ArrayAccess interface.

Parameters
string$offset
Returns
boolean
saveXml ( )

Get an XML string representation of this element.

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

Returns
string
saveXmlFragment ( )

Get the XML for only this element.

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

Returns
string
setDOM ( DOMElement  $element)

Update the object from a DOM element.

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
DOMElement$element
Returns
void
setEncoding (   $value)

Set encoding.

Parameters
string$valueEncoding to use
Returns
Zend_Feed_Element
setParent ( Zend_Feed_Element  $element)

Set the parent element of this object to another Zend_Feed_Element.

Parameters
Zend_Feed_Element$element
Returns
void

Member Data Documentation

$_appended = true
protected
$_element
protected
$_encoding = 'UTF-8'
protected
$_parentElement
protected