Abstract Class Zend_Gdata_App_Base

Description

Abstract class for all XML elements

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • abstract:
  • license: New BSD License

Located in /Gdata/App/Base.php (line 30)


	
			
Direct descendents
Class Description
Abstract class Zend_Gdata_App_Extension Abstract class for all XML elements
Abstract class Zend_Gdata_App_FeedEntryParent Abstract class for common functionality in entries and feeds
Variable Summary
Method Summary
 Zend_Gdata_App_Base __construct ()
 DOMElement getDOM ([DOMDocument $doc = null])
 void getText ([ $trim = true])
 void getXML ()
 string lookupNamespace ( $prefix)
 void registerNamespace (string $prefix, string $namespaceUri)
 string saveXML ()
 void setExtensionAttributes ( $value)
 void setExtensionElements ( $value)
 void setText ( $value)
 void takeAttributeFromDOM (DOMNode $attribute)
 void takeChildFromDOM (DOMNode $child)
 void transferFromDOM (DOMNode $node)
 void transferFromXML ( $xml)
 void __get (string $name)
 void __isset (string $name)
 void __set (string $name,  $val, string $value)
 void __toString ()
 void __unset (string $name)
Variables
array $_extensionAttributes = array() (line 57)
  • var: Leftover attributes which were not handled
  • access: protected
array $_extensionElements = array() (line 52)
  • var: Leftover elements which were not handled
  • access: protected
array $_namespaces = array(
'atom' => 'http://www.w3.org/2005/Atom',
'app' => 'http://purl.org/atom/app#'
)
(line 67)
  • access: protected
string $_rootElement = null (line 36)
  • var: The XML element name, including prefix if desired
  • access: protected

Redefined in descendants as:
string $_rootNamespaceURI = null (line 47)
  • var: The XML namespace URI - takes precedence over lookup up the corresponding URI for $_rootNamespace
  • access: protected
string $_text = null (line 62)
  • var: XML child text node content
  • access: protected
Methods
Constructor __construct (line 72)
  • access: public
Zend_Gdata_App_Base __construct ()

Redefined in descendants as:
getDOM (line 124)

Retrieves a DOMElement which corresponds to this element and all child properties. This is used to build an entry back into a DOM and eventually XML text for sending to the server upon updates, or for application storage/persistence.

  • return: The DOMElement representing this element and all child properties.
  • access: public
DOMElement getDOM ([DOMDocument $doc = null])
  • DOMDocument $doc: The DOMDocument used to construct DOMElements

Redefined in descendants as:
getExtensionAttributes (line 103)
  • access: public
void getExtensionAttributes ()
getExtensionElements (line 91)
  • access: public
void getExtensionElements ()
getText (line 76)
  • access: public
void getText ([ $trim = true])
  • $trim
getXML (line 245)

Alias for saveXML() returns XML content for this element and all

children

  • access: public
void getXML ()
lookupNamespace (line 260)

Get the full version of a namespace prefix

Looks up a prefix (atom:, etc.) in the list of registered namespaces and returns the full namespace URI if available. Returns the prefix, unmodified, if it's not registered.

  • access: public
string lookupNamespace ( $prefix)
  • $prefix
registerNamespace (line 279)

Add a namespace and prefix to the registered list

Takes a prefix and a full namespace URI and adds them to the list of registered namespaces for use by $this->lookupNamespace().

  • access: public
void registerNamespace (string $prefix, string $namespaceUri)
  • string $prefix: The namespace prefix
  • string $namespaceUri: The full namespace URI
saveXML (line 235)

Converts this element and all children into XML using getDOM()

  • return: XML content
  • access: public
string saveXML ()
setExtensionAttributes (line 108)
  • access: public
void setExtensionAttributes ( $value)
  • $value
setExtensionElements (line 96)
  • access: public
void setExtensionElements ( $value)
  • $value
setText (line 85)
  • access: public
void setText ( $value)
  • $value
takeAttributeFromDOM (line 178)

Given a DOMNode representing an attribute, tries to map the data into instance members. If no mapping is defined, the name and value are stored in an array.

  • access: protected
void takeAttributeFromDOM (DOMNode $attribute)
  • DOMNode $attribute: The DOMNode attribute needed to be handled

Redefined in descendants as:
takeChildFromDOM (line 160)

Given a child DOMNode, tries to determine how to map the data into object instance members. If no mapping is defined, Extension_Element objects are created and stored in an array.

  • access: protected
void takeChildFromDOM (DOMNode $child)
  • DOMNode $child: The DOMNode needed to be handled

Redefined in descendants as:
transferFromDOM (line 196)

Transfers each child and attribute into member variables.

This is called when XML is received over the wire and the data model needs to be built to represent this XML.

  • access: public
void transferFromDOM (DOMNode $node)
  • DOMNode $node: The DOMNode that represents this object's data

Redefined in descendants as:
transferFromXML (line 206)
  • access: public
void transferFromXML ( $xml)
  • $xml
__get (line 293)

Magic getter to allow acces like $entry->foo to call $entry->getFoo() Alternatively, if no getFoo() is defined, but a $_foo protected variable is defined, this is returned.

TODO Remove ability to bypass getFoo() methods??

  • access: public
void __get (string $name)
  • string $name: The variable name sought

Redefined in descendants as:
__isset (line 338)

Magic __isset method

  • access: public
void __isset (string $name)
  • string $name
__set (line 319)

Magic setter to allow acces like $entry->foo='bar' to call $entry->setFoo('bar') automatically.

Alternatively, if no setFoo() is defined, but a $_foo protected variable is defined, this is returned.

TODO Remove ability to bypass getFoo() methods??

  • access: public
void __set (string $name,  $val, string $value)
  • string $name
  • string $value
  • $val
__toString (line 375)

Magic toString method allows using this directly via echo

Works best in PHP >= 4.2.0

  • access: public
void __toString ()

Redefined in descendants as:
__unset (line 360)

Magic __unset method

  • access: public
void __unset (string $name)
  • string $name

Documentation generated on Sun, 27 May 2007 23:20:58 -0700 by phpDocumentor 1.3.2