API Documentation

Feed/Element.php

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: Element.php 20104 2010-01-06 21:26:01Z matthew $
Classes
Zend_Feed_Element

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_Element

Implements
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
Properties
$_element
$_encoding
$_parentElement
$_appended
Methods
__construct
getDOM
setDOM
setParent
ensureAppended
saveXml
saveXmlFragment
getEncoding
setEncoding
__get
__set
__isset
__call
__unset
__toString
_children
offsetExists
offsetGet
offsetSet
offsetUnset

Description

Wraps a DOMElement allowing for SimpleXML-like access to attributes.

Properties

$_appended

boolean $_appended = 'true'

Details

$_appended
boolean
visibility
protected
default
true
final
false
static
false

$_element

DOMElement $_element = ''

Details

$_element
DOMElement
visibility
protected
default
final
false
static
false

$_encoding

string $_encoding = 'UTF-8'

Details

$_encoding
string
Character encoding to utilize
visibility
protected
default
UTF-8
final
false
static
false

$_parentElement

Zend_Feed_Element $_parentElement = ''

Details

$_parentElement
Zend_Feed_Element
visibility
protected
default
final
false
static
false

Methods

__call

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

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.

Arguments
$var
string
The element to get the string value of.
$unused
mixed
This parameter is not used.
Output
mixed
The node's value, null, or an array of nodes.
Details
visibility
public
final
false
static
false

__construct

__construct( DOMElement $element = null ) : void

Zend_Feed_Element constructor.

Arguments
$element
DOMElement
The DOM element we're encapsulating.
Details
visibility
public
final
false
static
false

__get

__get( string $var ) : mixed

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.

Arguments
$var
string
The property to access.
Output
mixed
Details
visibility
public
final
false
static
false

__isset

__isset( string $var ) : boolean

Map isset calls onto the underlying entry representation.

Arguments
$var
string
Output
boolean
Details
visibility
public
final
false
static
false

__set

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

Map variable sets onto the underlying entry representation.

Arguments
$var
string
The property to change.
$val
string
The property's new value.
Details
visibility
public
final
false
static
false
throws

__toString

__toString( ) : string

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

Output
string
Details
visibility
public
final
false
static
false

__unset

__unset( string $var ) : void

Remove all children matching $var.

Arguments
$var
string
Details
visibility
public
final
false
static
false

_children

_children( string $var ) : array

Finds children with tagnames matching $var

Similar to SimpleXML's children() method.

Arguments
$var
string
Tagname to match, can be either namespace:tagName or just tagName.
Output
array
Details
visibility
protected
final
false
static
false

ensureAppended

ensureAppended( ) : void

Appends this element to its parent if necessary.

Details
visibility
protected
final
false
static
false

getDOM

getDOM( ) : DOMDocument

Get a DOM representation of the element

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

Output
DOMDocument
Details
visibility
public
final
false
static
false

getEncoding

getEncoding( ) : string

Get encoding

Output
string
Details
visibility
public
final
false
static
false

offsetExists

offsetExists( string $offset ) : boolean

Required by the ArrayAccess interface.

Arguments
$offset
string
Output
boolean
Details
visibility
public
final
false
static
false

offsetGet

offsetGet( string $offset ) : string

Required by the ArrayAccess interface.

Arguments
$offset
string
Output
string
Details
visibility
public
final
false
static
false

offsetSet

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

Required by the ArrayAccess interface.

Arguments
$offset
string
$value
string
Output
string
Details
visibility
public
final
false
static
false

offsetUnset

offsetUnset( string $offset ) : boolean

Required by the ArrayAccess interface.

Arguments
$offset
string
Output
boolean
Details
visibility
public
final
false
static
false

saveXml

saveXml( ) : string

Get an XML string representation of this element

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

Output
string
Details
visibility
public
final
false
static
false

saveXmlFragment

saveXmlFragment( ) : string

Get the XML for only this element

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

Output
string
Details
visibility
public
final
false
static
false

setDOM

setDOM( DOMElement $element ) : void

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.

Arguments
$element
DOMElement
Details
visibility
public
final
false
static
false

setEncoding

setEncoding( string $value ) : Zend_Feed_Element

Set encoding

Arguments
$value
string
Encoding to use
Details
visibility
public
final
false
static
false

setParent

setParent( Zend_Feed_Element $element ) : void

Set the parent element of this object to another Zend_Feed_Element.

Arguments
$element
Zend_Feed_Element
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.