Feed/Element.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Feed
- Version
- $Id$
Package: Zend_FeedWraps a DOMElement allowing for SimpleXML-like access to attributes.
- Implements
- Children
- \Zend_Feed_Entry_Abstract
- \Zend_Feed_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



string $_encoding = 'UTF-8'Character encoding to utilize
Default value'UTF-8'Details- Type
- string
Methods



__call(string $var, mixed $unused) : mixedGet 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| Name | Type | Description |
|---|
| $var | string | The element to get the string value of. |
|---|
| $unused | mixed | This parameter is not used. |
|---|
Returns| Type | Description |
|---|
| mixed | The node's value, null, or an array of nodes. |



__construct(\DOMElement $element = null) : voidZend_Feed_Element constructor.
Parameters| Name | Type | Description |
|---|
| $element | \DOMElement | The DOM element we're encapsulating. |
|---|



__get(string $var) : mixedMap 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| Name | Type | Description |
|---|
| $var | string | The property to access. |
|---|
Returns


__isset(string $var) : booleanMap isset calls onto the underlying entry representation.
Parameters| Name | Type | Description |
|---|
| $var | string | |
|---|
Returns 


__set(string $var, string $val) : voidMap variable sets onto the underlying entry representation.
Parameters| Name | Type | Description |
|---|
| $var | string | The property to change. |
|---|
| $val | string | The property's new value. |
|---|
Throws 


__unset(string $var) : voidRemove all children matching $var.
Parameters| Name | Type | Description |
|---|
| $var | string | |
|---|



_children(string $var) : arrayFinds children with tagnames matching $var
Similar to SimpleXML's children() method.
Parameters| Name | Type | Description |
|---|
| $var | string | Tagname to match, can be either namespace:tagName or just tagName. |
|---|
Returns


getDOM() : \DOMDocumentGet a DOM representation of the element
Returns the underlying DOM object, which can then be
manipulated with full DOM methods.
Returns


offsetExists(string $offset) : booleanRequired by the ArrayAccess interface.
Parameters| Name | Type | Description |
|---|
| $offset | string | |
|---|
Returns 


offsetGet(string $offset) : stringRequired by the ArrayAccess interface.
Parameters| Name | Type | Description |
|---|
| $offset | string | |
|---|
Returns 


offsetSet(string $offset, string $value) : stringRequired by the ArrayAccess interface.
Parameters| Name | Type | Description |
|---|
| $offset | string | |
|---|
| $value | string | |
|---|
Returns 


offsetUnset(string $offset) : booleanRequired by the ArrayAccess interface.
Parameters| Name | Type | Description |
|---|
| $offset | string | |
|---|
Returns 


saveXml() : stringGet an XML string representation of this element
Returns a string of this element's XML, including the XML
prologue.
Returns


saveXmlFragment() : stringGet the XML for only this element
Returns a string of this element's XML without prologue.
Returns


setDOM(\DOMElement $element) : voidUpdate 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


setEncoding(string $value) : \Zend_Feed_ElementParameters| Name | Type | Description |
|---|
| $value | string | Encoding to use |
|---|
Returns