Methods
All methods in the Solar_Struct_Xml class.
Public
- 
__construct()
- 
Constructor. 
- 
__destruct()
- 
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct(). 
- 
__get()
- 
Gets a data value. 
- 
__isset()
- 
Does a certain key exist in the data? 
- 
__set()
- 
Sets a key value and marks the struct as "dirty". 
- 
__toString()
- 
Returns the struct as a string of XML. 
- 
__unset()
- 
Sets a key in the data to null. 
- 
count()
- 
Countable: how many keys are there? 
- 
dump()
- 
Convenience method for getting a dump the whole object, or one of its properties, or an external variable. 
- 
free()
- 
Frees memory used by this struct, especially references to parent structs down the line. 
- 
getIterator()
- 
IteratorAggregate: returns an external iterator for this struct. 
- 
getKeys()
- 
Returns all the keys for this struct. 
- 
getParent()
- 
Returns the hierarchical parent struct, if any. 
- 
isDirty()
- 
Is the struct dirty? 
- 
load()
- 
Loads this object with XML data, replacing any existing XML in the object. 
- 
locale()
- 
Looks up class-specific locale strings based on a key. 
- 
offsetExists()
- 
ArrayAccess: does the requested key exist? 
- 
offsetGet()
- 
ArrayAccess: get a key value. 
- 
offsetSet()
- 
ArrayAccess: set a key value. 
- 
offsetUnset()
- 
ArrayAccess: unset a key. 
- 
setParent()
- 
Sets the hierarchical parent struct. 
- 
toArray()
- 
Returns a copy of the struct as an array, recursively descending to convert child structs into arrays as well. 
- 
toString()
- 
Returns a string representation of the struct. 
Protected
- 
_buildConfig()
- 
Builds and returns the default config for a class, including all configs inherited from its parents. 
- 
_convert()
- 
Support method to recursively convert a SimpleXMLElement tree to an array or Solar_Struct; does not retain XML attributes. 
- 
_escape()
- 
Support method to escape values for XML. 
- 
_exception()
- 
Convenience method for returning exceptions with localized text. 
- 
_free()
- 
Recursively descends and calls free() on child structs. 
- 
_load()
- 
Overridable method to load the struct with array data. 
- 
_loadArray()
- 
Support method to load data from an array. 
- 
_loadDomNode()
- 
Support method to load data from a DOMNode. 
- 
_loadSimpleXmlElement()
- 
Support method to load data from a SimpleXMLElement. 
- 
_loadString()
- 
Support method to load data from a string. 
- 
_loadStruct()
- 
Support method to load data from a Solar_Struct. 
- 
_postConfig()
- 
A hook that activates after _buildConfig() in the constructor. 
- 
_postConstruct()
- 
Post-construction tasks to complete object construction. 
- 
_preConfig()
- 
A hook that activates before _buildConfig() in the constructor. 
- 
_setIsDirty()
- 
Marks the struct and its parents as dirty. 
- 
_toArray()
- 
Support method for toArray(). 
- 
_toString()
- 
Support method to recursively convert an array to an XML string; escapes the array keys and values as it goes. 
Private
None.