Class: I2CE MagicDataNode: Difference between revisions

From IHRIS Wiki
No edit summary
(Redirected page to Class: I2CE MagicDataNode (4.0.3))
Line 1: Line 1:
This article describes the class ''I2CE_MagicDataNode''.
#REDIRECT [[Class: I2CE_MagicDataNode (4.0.3)]]
*Implements the interface [http://www.php.net/manual/en/class.recursiveiterator.php RecursiveIterator ]
*Implements the interface [http://www.php.net/manual/en/class.seekableiterator.php SeekableIterator ]
*Implements the interface [http://www.php.net/manual/en/class.arrayaccess.php ArrayAccess ]
*Implements the interface [http://www.php.net/manual/en/class.countable.php Countable ]
*Child Classes:
** [[Class: I2CE_MagicData | I2CE_MagicData]]
*Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L34 lib/I2CE_MagicDataNode.php] on line 34
Configuration class to lookup and save configuration options.
==Constants==
===I2CE_MagicDataNode::TYPE_NOT_POPULATED===
Constant type value when this data set hasn't tried to
populate from storage yet.
Defined as: -2
===I2CE_MagicDataNode::TYPE_INDETERMINATE===
Constant type value when this data set hasn't been defined.
Defined as: -1
===I2CE_MagicDataNode::TYPE_PARENT===
Constant type value when this data set is a parent node.
Defined as: 0
===I2CE_MagicDataNode::TYPE_STRING_VALUE===
Constant type value when this data set is a string value.
Defined as: 1
==Variables==
===$type===
The type of this configuration setting.  Possible values are -1 = unset, 0 = parent object, 1 = scalar/value.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L60 i2ce/lib/I2CE_MagicDataNode.php] on line 60
*Type: protected integer $type
 
===$name===
The name of this configuration setting.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L64 i2ce/lib/I2CE_MagicDataNode.php] on line 64
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $name
 
===$value===
The value of this configuration setting.  This is only valid when type = 1.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L69 i2ce/lib/I2CE_MagicDataNode.php] on line 69
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $value
 
===$children===
All children configuration objects for this configuration group.  This is only valid when type = 0
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L73 i2ce/lib/I2CE_MagicDataNode.php] on line 73
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $children
 
===$parent===
The parent of this configuration.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L77 i2ce/lib/I2CE_MagicDataNode.php] on line 77
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $parent
 
===$parentPath===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L78 i2ce/lib/I2CE_MagicDataNode.php] on line 78
*Type: protected $parentPath
 
===$parentPathTop===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L79 i2ce/lib/I2CE_MagicDataNode.php] on line 79
*Type: protected $parentPathTop
 
===$top===
The top level of this configuration.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L83 i2ce/lib/I2CE_MagicDataNode.php] on line 83
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $top
 
===$volatile===
.  True if the data is volatile.  Defaults to false
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L88 i2ce/lib/I2CE_MagicDataNode.php] on line 88
*Type: protected [http://www.php.net/manual/en/language.types.boolean.php boolean ] $volatile
 
===$attributes===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1704 i2ce/lib/I2CE_MagicDataNode.php] on line 1704
*Type: protected $attributes
 
==Methods==
===__construct()===
Construct a new configuration value or grouping.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L190 i2ce/lib/I2CE_MagicDataNode.php] on line 190
*Signature: protected function __construct($name,$parent,$check_key)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name of this configuration setting.
***Default Value: null
** [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $parent <br/>The parent of this configuration setting.
***Default Value: null
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $check_key <br/>Defaults to true in which case we check that the key is valid.
***Default Value: true
===__get()===
Get the value for a child configuration option.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L987 i2ce/lib/I2CE_MagicDataNode.php] on line 987
*Signature: public function __get($path)
*Parameters:
**$path
*Returns: mixed.<br/>Null if the path was invalid. I2CE_MagicDataNode or string on success
===__isset()===
Check to see if a given key or path exists and the value is set
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1087 i2ce/lib/I2CE_MagicDataNode.php] on line 1087
*Signature: public function __isset($path)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $path <br/>{@see traverse()} returns mixed.  Booolean true or false if the magic data referenced by the given path is set.  null on failure (invalid path)
===__set()===
Set the value for a child configuration option.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L956 i2ce/lib/I2CE_MagicDataNode.php] on line 956
*Signature: public function __set($path,$value)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $path <br/>{@see traverse()}
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
===__toString()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1367 i2ce/lib/I2CE_MagicDataNode.php] on line 1367
*Signature: public function __toString()
===__unset()===
Unset a given key in the children array.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1179 i2ce/lib/I2CE_MagicDataNode.php] on line 1179
*Signature: final public function __unset($key)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $key
===_getAsArray()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1344 i2ce/lib/I2CE_MagicDataNode.php] on line 1344
*Signature: protected function _getAsArray($locale)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $locale <br/>The locale we wish to get the values for.  Defaults to null meaning we are not getting tranlsated values.
***Default Value: null
===_getAttribute()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1744 i2ce/lib/I2CE_MagicDataNode.php] on line 1744
*Signature: protected function _getAttribute($key,$prefix)
*Parameters:
**$key
**$prefix
===_getAttributes()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1801 i2ce/lib/I2CE_MagicDataNode.php] on line 1801
*Signature: protected function _getAttributes($keys_only,$prefix)
*Parameters:
**$keys_only
**$prefix
===_hasAttribute()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1717 i2ce/lib/I2CE_MagicDataNode.php] on line 1717
*Signature: protected function _hasAttribute($key,$prefix)
*Parameters:
**$key
**$prefix
===_removeAttribute()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1775 i2ce/lib/I2CE_MagicDataNode.php] on line 1775
*Signature: protected function _removeAttribute($prefix,$key)
*Parameters:
**$prefix
**$key
===_setAttribute()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1850 i2ce/lib/I2CE_MagicDataNode.php] on line 1850
*Signature: protected function _setAttribute($key,$val,$prefix)
*Parameters:
**$key
**$val
**$prefix
===checkKey()===
Check to make sure a given key is valid. It can be any combination of _-+.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L125 i2ce/lib/I2CE_MagicDataNode.php] on line 125
*Signature: static public function checkKey($key)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $key
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===count()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1574 i2ce/lib/I2CE_MagicDataNode.php] on line 1574
*Signature: public function count()
===current()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1590 i2ce/lib/I2CE_MagicDataNode.php] on line 1590
*Signature: public function current()
===erase()===
Erases the current node and all of its subnodes from the storage mechanism.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1246 i2ce/lib/I2CE_MagicDataNode.php] on line 1246
*Signature: public function erase($locale)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $locale <br/>The locale we wish to erase the values for.  Defaults to null meaning we erase all values/locales
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>true on success
===eraseChildren()===
Erases all children of the current node and all of its subnodes from the storage mechanism.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1200 i2ce/lib/I2CE_MagicDataNode.php] on line 1200
*Signature: public function eraseChildren($locale)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $locale <br/>The locale we wish to erase the values for.  Defaults to null meaning we erase all values/locales
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>true on success
===getAsArray()===
Return an array of all the child values for this object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1324 i2ce/lib/I2CE_MagicDataNode.php] on line 1324
*Signature: public function getAsArray($path,$locale)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $path <br/>{@see traverse()}.  Defaults to null which means we get at this node
***Default Value: null
** [http://www.php.net/manual/en/language.types.string.php string ] $locale <br/>The locale we wish to get the values for.  Defaults to null meaning we are not getting tranlsated values.
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getAttribute()===
Gets an attribute
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1739 i2ce/lib/I2CE_MagicDataNode.php] on line 1739
*Signature: public function getAttribute($key)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $key
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>string if the attribute value. null if it does not exist.
===getAttributes()===
Get the attributes
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1797 i2ce/lib/I2CE_MagicDataNode.php] on line 1797
*Signature: public function getAttributes($keys_only)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $keys_only <br/>Defaults to false.  If true returns only the attribute names that are set. If true returns associative array of attribute=>value pairs
***Default Value: false
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getChildren()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1692 i2ce/lib/I2CE_MagicDataNode.php] on line 1692
*Signature: public function getChildren()
===getKeys()===
Return an array of all child keys for this object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1289 i2ce/lib/I2CE_MagicDataNode.php] on line 1289
*Signature: public function getKeys($path,$attrs)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $path <br/>{@see traverse()}
***Default Value: null
**$attrs
***Default Value: false
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getName()===
Return the name of this configuration setting.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L180 i2ce/lib/I2CE_MagicDataNode.php] on line 180
*Signature: public function getName()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getParent()===
Get the parent magic data node
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1077 i2ce/lib/I2CE_MagicDataNode.php] on line 1077
*Signature: public function getParent()
*Returns: [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]]
===getPath()===
Return the full path to this configuration setting.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L151 i2ce/lib/I2CE_MagicDataNode.php] on line 151
*Signature: public function getPath($show_top)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $show_top <br/>defaults to true if we are to show the parent
***Default Value: true
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getSaveValue()===
Return the direct scalar value for this node.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L890 i2ce/lib/I2CE_MagicDataNode.php] on line 890
*Signature: public function getSaveValue()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getTranslation()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L503 i2ce/lib/I2CE_MagicDataNode.php] on line 503
*Signature: public function getTranslation($locale,$resolve,$path)
*Parameters:
**$locale
**$resolve
***Default Value: true
**$path
***Default Value: null
===getTranslations()===
Get the translations for the current node
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L392 i2ce/lib/I2CE_MagicDataNode.php] on line 392
*Signature: public function getTranslations($locales_only,$include_default_locale)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $locales_only <br/>Defaults to false.  If true returns only the loclaes for which a translation exists If true returns associative array of locale=>translation pairs
***Default Value: false
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $include_default_locale <br/>Defaults to true in which case we include the nodes values under the default locale
***Default Value: true
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getType()===
Return the type of this node.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L701 i2ce/lib/I2CE_MagicDataNode.php] on line 701
*Signature: public function getType()
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>or false on failure
===getValue()===
Return the value of this configuration object if the type == 1 and the current object if type is anything else.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L330 i2ce/lib/I2CE_MagicDataNode.php] on line 330
*Signature: public function getValue()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
===hasAttribute()===
Checks to see if an attribute is present
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1712 i2ce/lib/I2CE_MagicDataNode.php] on line 1712
*Signature: public function hasAttribute($key)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $key
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>boolean.  true if key exists, false if it does not, null if an invalid key
===hasChildren()===
whether the current key has children or not. this is _not_ whether this has a children or not
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1682 i2ce/lib/I2CE_MagicDataNode.php] on line 1682
*Signature: public function hasChildren()
===isScalar()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L91 i2ce/lib/I2CE_MagicDataNode.php] on line 91
*Signature: private function isScalar()
===is_indeterminate()===
Check to see if the value at the specified path is indeterminate @param strign $key. A key or path in the magic data.  If null (default) then we are checking on the node itself
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L840 i2ce/lib/I2CE_MagicDataNode.php] on line 840
*Signature: public function is_indeterminate($path)
*Parameters:
**$path
***Default Value: null
*Returns: boolean.<br/>True if it is a scalar value
===is_parent()===
Check to see if the value at the specified path is set and is a parent node. @param strign $key. A key or path in the magic data.  If null (default) then we are checking on the node itself
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L865 i2ce/lib/I2CE_MagicDataNode.php] on line 865
*Signature: public function is_parent($path)
*Parameters:
**$path
***Default Value: null
*Returns: boolean.<br/>True if it is a scalar value
===is_populated()===
Check to see if the value at the specified path is populated @param strign $key. A key or path in the magic data.  If null (default) then we are checking on the node itself
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L795 i2ce/lib/I2CE_MagicDataNode.php] on line 795
*Signature: protected function is_populated($path)
*Parameters:
**$path
***Default Value: null
*Returns: boolean.<br/>True if it is a scalar value
===is_root()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L814 i2ce/lib/I2CE_MagicDataNode.php] on line 814
*Signature: public function is_root($path)
*Parameters:
**$path
***Default Value: null
===is_scalar()===
Check to see if the value at the specified path is set and is a scalar. @param strign $key. A key or path in the magic data.  If null (default) then we are checking on the node itself
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L716 i2ce/lib/I2CE_MagicDataNode.php] on line 716
*Signature: public function is_scalar($path)
*Parameters:
**$path
***Default Value: null
*Returns: boolean.<br/>True if it is a scalar value
===is_translatable()===
Checked to see if the node referenced is translatable
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L359 i2ce/lib/I2CE_MagicDataNode.php] on line 359
*Signature: public function is_translatable($path)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $path <br/>Defaults to null, meaning the current node.
***Default Value: null
*Returns: boolean.
===is_translated()===
Checked to see if the node referenced is translated ito the given locale
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L412 i2ce/lib/I2CE_MagicDataNode.php] on line 412
*Signature: public function is_translated($locale,$path)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $locale
** [http://www.php.net/manual/en/language.types.string.php string ] $path <br/>Defaults to null, meaning the current node.
***Default Value: null
*Returns: boolean.
===key()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1604 i2ce/lib/I2CE_MagicDataNode.php] on line 1604
*Signature: public function key()
===krsort()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1958 i2ce/lib/I2CE_MagicDataNode.php] on line 1958
*Signature: public function krsort($sort_flags,$recurse)
*Parameters:
**$sort_flags
***Default Value: SORT_REGULAR
**$recurse
***Default Value: false
===ksort()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1928 i2ce/lib/I2CE_MagicDataNode.php] on line 1928
*Signature: public function ksort($sort_flags,$recurse)
*Parameters:
**$sort_flags
***Default Value: SORT_REGULAR
**$recurse
***Default Value: false
===newAttribute()===
Make a new attribute this object with the given key.  The $nosave flag should only be set when populating a parent node from storage.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1896 i2ce/lib/I2CE_MagicDataNode.php] on line 1896
*Signature: protected function newAttribute($key,$save,$prefix)
*Parameters:
** scalar $key <br/>the key
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $save <br/>Set to true to not save the parent and attribute
**$prefix
*Returns: mixed.<br/>false on failure, the attribute created on succes
===newChild()===
Make a new child for this object with the given key.  The $nosave flag should only be set when populating a parent node from storage.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L910 i2ce/lib/I2CE_MagicDataNode.php] on line 910
*Signature: protected function newChild($key,$save)
*Parameters:
** scalar $key <br/>If a boolean and true, we add to the end of the array.  Otherwise we use the given key as a key.
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $save <br/>Set to true to not save the parent after creating this child.
***Default Value: TRUE
*Returns: [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]]<br/>The child that was created or null on failure
===next()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1613 i2ce/lib/I2CE_MagicDataNode.php] on line 1613
*Signature: public function next()
===offsetExists()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1479 i2ce/lib/I2CE_MagicDataNode.php] on line 1479
*Signature: public function offsetExists($key)
*Parameters:
**$key
===offsetGet()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1502 i2ce/lib/I2CE_MagicDataNode.php] on line 1502
*Signature: public function offsetGet($key)
*Parameters:
**$key
===offsetSet()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1528 i2ce/lib/I2CE_MagicDataNode.php] on line 1528
*Signature: public function offsetSet($key,$val)
*Parameters:
**$key
**$val
===offsetUnset()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1550 i2ce/lib/I2CE_MagicDataNode.php] on line 1550
*Signature: public function offsetUnset($key)
*Parameters:
**$key
===pathDivider()===
Return the path divider for this MagicDataNode object
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L144 i2ce/lib/I2CE_MagicDataNode.php] on line 144
*Signature: protected function pathDivider()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===pathExists()===
Check to see if a given key  key or path exists
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1113 i2ce/lib/I2CE_MagicDataNode.php] on line 1113
*Signature: public function pathExists($path)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $path <br/>{@see traverse()} returns mixed.  Booolean true or false if the magic data referenced by the given path is set.  null on failure (invalid path)
===pop()===
Pop a value off the end of a parent/indeterminate node. @param mixed.  Scalar value if the node is scalar, an array if it is a parent, otherwise null.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1440 i2ce/lib/I2CE_MagicDataNode.php] on line 1440
*Signature: public function pop()
===populate()===
Populate any stored data based on the storage objects set in the top node.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L252 i2ce/lib/I2CE_MagicDataNode.php] on line 252
*Signature: protected function populate()
*Returns: true<br/>on success.
===push()===
Push a value onto the end of a parent/indeterminate node.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1419 i2ce/lib/I2CE_MagicDataNode.php] on line 1419
*Signature: public function push($val)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $val
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>the number of children the current node has.  null on failure
===raiseError()===
Raise an error and redirect the user for any critical errors. The default redirect will go to the home page for the site. @param string/mixed $message The error message.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L2031 i2ce/lib/I2CE_MagicDataNode.php] on line 2031
*Signature: static public function raiseError($message,$type,$redirect)
*Parameters:
**$message
** integer $type <br/>The error type.
***Default Value: E_USER_NOTICE
** [http://www.php.net/manual/en/language.types.string.php string ] $redirect <br/>The page to redirect to for critical errors. @global array
***Default Value: ""
===removeAttribute()===
Removes an attribute
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1770 i2ce/lib/I2CE_MagicDataNode.php] on line 1770
*Signature: public function removeAttribute($key)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $key
*Returns: true<br/>if the attribute was removed.  false if the attribute did not exist
===removeTranslation()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1231 i2ce/lib/I2CE_MagicDataNode.php] on line 1231
*Signature: public function removeTranslation($locale)
*Parameters:
**$locale
===rewind()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1626 i2ce/lib/I2CE_MagicDataNode.php] on line 1626
*Signature: public function rewind()
===save()===
Call all the storage methods associated with this configuration.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1379 i2ce/lib/I2CE_MagicDataNode.php] on line 1379
*Signature: protected function save($recurse)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $recurse <br/>Defaults to false.  If true, and we were able to succesfully save this node, we recrusively save all the populated children of this node as well.
***Default Value: false
===setAttribute()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1835 i2ce/lib/I2CE_MagicDataNode.php] on line 1835
*Signature: public function setAttribute($key,$val)
*Parameters:
**$key
**$val
===setIfIsSet()===
If the data referenced by that path is set, we set the value of $data to that data
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1141 i2ce/lib/I2CE_MagicDataNode.php] on line 1141
*Signature: public function setIfIsSet($data,$path,$as_array)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] &$data <br/>where you wish to store the magic data if it is set
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $path <br/>{@see traverse()}.  Defaults to null which means we get at this node
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $as_array <br/>defaults to false.  If true, will set $data to be the result of calling getAsArray() on the magic data referenced by $path.  If false then we only set $data if the magic data node refrenced by $path is a leaf node/value
***Default Value: false
*Returns: boolean.<br/>true if the value was set
===setTranslatable()===
Sets the translatable attribute for the referenced node @param boolean $transtable. Defaults to true
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L443 i2ce/lib/I2CE_MagicDataNode.php] on line 443
*Signature: public function setTranslatable($path,$translatable)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $path <br/>Defaults to null, meaning the current node
***Default Value: null
**$translatable
***Default Value: true
*Returns: true<br/>on success, false on failure
===setTranslation()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L469 i2ce/lib/I2CE_MagicDataNode.php] on line 469
*Signature: public function setTranslation($locale,$translation,$path)
*Parameters:
**$locale
**$translation
**$path
***Default Value: null
===setType()===
Set the type for this object.  The nosave flag should be set to true if the calling function is going to save so that it doesn't get saved twice.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L688 i2ce/lib/I2CE_MagicDataNode.php] on line 688
*Signature: protected function setType($type)
*Parameters:
** integer $type
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>true on success
===setValue()===
Set the scalar value for this object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L553 i2ce/lib/I2CE_MagicDataNode.php] on line 553
*Signature: public function setValue($value,$locale,$set_default_locale)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
** [http://www.php.net/manual/en/language.types.string.php string ] $locale <br/>The locale we wish to set the value for.  Defaults to null meaning we are not setting tranlsated values.
***Default Value: null
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $set_default_locale <br/>Defautls to true.  When setting values, make sure the default locale is set.
***Default Value: true
*Returns: true<br/>on sucess
===set_parent()===
Set the magic data node at the specified  path to be a parent node if is indeterminate @param strign $key. A key or path in the magic data.  If null (default) then we are checking on the node itself
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L768 i2ce/lib/I2CE_MagicDataNode.php] on line 768
*Signature: public function set_parent($path)
*Parameters:
**$path
***Default Value: null
*Returns: boolean.<br/>True on success
===set_scalar()===
Set the magic data node at the specified  path to be scalar if is indeterminate @param strign $key. A key or path in the magic data.  If null (default) then we are checking on the node itself
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L740 i2ce/lib/I2CE_MagicDataNode.php] on line 740
*Signature: public function set_scalar($path)
*Parameters:
**$path
***Default Value: null
*Returns: boolean.<br/>True on success
===traverse()===
Traverse magic data by a given path
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1005 i2ce/lib/I2CE_MagicDataNode.php] on line 1005
*Signature: public function traverse($path,$create,$return_value)
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $path <br/>A string which is a path e.g. '/some/magic/data/path' or an array of path components e.g. array('some','magic','data','path). There are three special path components, '', '.' and  '..' The first two mean don't go anywhere, while the third means go to the parent node.
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $create <br/>Defaults to false.  If true, it will create the magic data path as it goes.  If false, it will return null if the path is not already set.
***Default Value: false
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $return_value <br/>Defaults to true.  If true returns the value of of a leaf node rather than the node itself
***Default Value: true
*Returns: mixed.<br/>String, if the path is valid and refers to a leaf node. I2CE_MagicDataNode  if the path is valid but not a leaf node, or  null on ffailure (invalid path/path not set)
===uksort()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1988 i2ce/lib/I2CE_MagicDataNode.php] on line 1988
*Signature: public function uksort($cmp_function,$recurse)
*Parameters:
**$cmp_function
**$recurse
***Default Value: false
===unpopulate()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L220 i2ce/lib/I2CE_MagicDataNode.php] on line 220
*Signature: public function unpopulate($deep)
*Parameters:
**$deep
***Default Value: true
===valid()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L1636 i2ce/lib/I2CE_MagicDataNode.php] on line 1636
*Signature: public function valid()
===volatile()===
Check/set whether this magic data is volatile or not
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_MagicDataNode.php#L105 i2ce/lib/I2CE_MagicDataNode.php] on line 105
*Signature: public function volatile($volatile)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $volatile <br/>If set, we set the volatility of this node (does not apply to subnodes).  If not set we return the volatility state of this node.  Defaults to not set (null).  Recursively sets all sub-nodes to volatile.
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
 
 
[[Category:Class Documentation]]

Revision as of 16:16, 10 March 2010