com.caucho.quercus.lib.simplexml
Class SimpleXMLAttributeList

java.lang.Object
  extended by com.caucho.quercus.lib.simplexml.SimpleXMLElement
      extended by com.caucho.quercus.lib.simplexml.SimpleXMLAttributeList
All Implemented Interfaces:
java.util.Map.Entry<java.lang.String,java.lang.Object>

public class SimpleXMLAttributeList
extends SimpleXMLElement

SimpleXMLElement object oriented API facade. Also acts as the DOM document.


Field Summary
 
Fields inherited from class com.caucho.quercus.lib.simplexml.SimpleXMLElement
_attributes, _children, _cls, _env, _name, _namespace, _namespaceMap, _parent, _prefix, _text
 
Constructor Summary
protected SimpleXMLAttributeList(Env env, QuercusClass cls, SimpleXMLElement parent, java.lang.String name)
           
protected SimpleXMLAttributeList(Env env, QuercusClass cls, SimpleXMLElement parent, java.lang.String name, java.lang.String namespace, StringValue text)
           
 
Method Summary
 Value __get(Env env, Value indexV)
          Implementation for getting the indices of this class.
protected  void addNamespace(java.lang.String prefix, java.lang.String namespace)
           
protected  void addNamespaceAttribute(Env env, java.lang.String name, java.lang.String namespace)
          Adds a namespace attribute to this node.
 StringValue asXML(Env env)
          Converts node tree to a valid xml string.
 java.util.Iterator iterator()
          Required for 'foreach'.
 java.lang.String simplexml_getName()
          Returns the name of the node.
protected  void toXMLImpl(StringValue sb)
           
 
Methods inherited from class com.caucho.quercus.lib.simplexml.SimpleXMLElement
__construct, __count, __getField, __set, __setField, __toString, addAttribute, addAttribute, addChild, addText, attributes, children, create, entrySet, getAttribute, getDocNamespaces, getKey, getName, getNamespace, getNamespace, getNamespaces, getOwner, getQuercusClass, getValue, hasNamespace, isElement, isNamespaceAttribute, isSameNamespace, isSamePrefix, jsonEncode, jsonEncodeImpl, printDepth, setQuercusClass, setText, setValue, toXML, varDumpImpl, wrapJava, xpath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, hashCode
 

Constructor Detail

SimpleXMLAttributeList

protected SimpleXMLAttributeList(Env env,
                                 QuercusClass cls,
                                 SimpleXMLElement parent,
                                 java.lang.String name)

SimpleXMLAttributeList

protected SimpleXMLAttributeList(Env env,
                                 QuercusClass cls,
                                 SimpleXMLElement parent,
                                 java.lang.String name,
                                 java.lang.String namespace,
                                 StringValue text)
Method Detail

simplexml_getName

public java.lang.String simplexml_getName()
Returns the name of the node.

Overrides:
simplexml_getName in class SimpleXMLElement
Returns:
name of the node

addNamespace

protected void addNamespace(java.lang.String prefix,
                            java.lang.String namespace)
Overrides:
addNamespace in class SimpleXMLElement

addNamespaceAttribute

protected void addNamespaceAttribute(Env env,
                                     java.lang.String name,
                                     java.lang.String namespace)
Adds a namespace attribute to this node.

Overrides:
addNamespaceAttribute in class SimpleXMLElement

iterator

public java.util.Iterator iterator()
Required for 'foreach'. When only values are specified in the loop foreach($a as $b), this method should return an iterator that contains Java objects that will be wrapped in a Value. When a 'foreach' loop with name/value pairs i.e. foreach($a as $b=>$c) invokes this method, it expects an iterator that contains objects that implement Map.Entry.

Overrides:
iterator in class SimpleXMLElement

asXML

public StringValue asXML(Env env)
Converts node tree to a valid xml string.

Overrides:
asXML in class SimpleXMLElement
Returns:
xml string

toXMLImpl

protected void toXMLImpl(StringValue sb)
Overrides:
toXMLImpl in class SimpleXMLElement

__get

public Value __get(Env env,
                   Value indexV)
Implementation for getting the indices of this class. i.e. $a->foo[0]

Overrides:
__get in class SimpleXMLElement