Class: I2CE MagicDataNode (Development): Difference between revisions
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
*Child Classes: | *Child Classes: | ||
** [[Class: I2CE_MagicData (Development) | I2CE_MagicData]] | ** [[Class: I2CE_MagicData (Development) | I2CE_MagicData]] | ||
*Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4. | *Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L34 lib/I2CE_MagicDataNode.php] on line 34 | ||
Configuration class to lookup and save configuration options. | Configuration class to lookup and save configuration options. | ||
==Constants== | ==Constants== | ||
Line 27: | Line 27: | ||
===$type=== | ===$type=== | ||
The type of this configuration setting. Possible values are -1 = unset, 0 = parent object, 1 = scalar/value. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L60 i2ce/lib/I2CE_MagicDataNode.php] on line 60 | ||
*Type: protected integer $type | *Type: protected integer $type | ||
===$name=== | ===$name=== | ||
The name of this configuration setting. | The name of this configuration setting. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/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 | *Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $name | ||
===$value=== | ===$value=== | ||
The value of this configuration setting. This is only valid when type = 1. | The value of this configuration setting. This is only valid when type = 1. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/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 | *Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $value | ||
===$children=== | ===$children=== | ||
All children configuration objects for this configuration group. This is only valid when type = 0 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/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 | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $children | ||
===$parent=== | ===$parent=== | ||
The parent of this configuration. | The parent of this configuration. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L77 i2ce/lib/I2CE_MagicDataNode.php] on line 77 | ||
*Type: protected [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $parent | *Type: protected [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $parent | ||
===$parentPath=== | ===$parentPath=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L78 i2ce/lib/I2CE_MagicDataNode.php] on line 78 | ||
*Type: protected $parentPath | *Type: protected $parentPath | ||
===$parentPathTop=== | ===$parentPathTop=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L79 i2ce/lib/I2CE_MagicDataNode.php] on line 79 | ||
*Type: protected $parentPathTop | *Type: protected $parentPathTop | ||
===$top=== | ===$top=== | ||
The top level of this configuration. | The top level of this configuration. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L83 i2ce/lib/I2CE_MagicDataNode.php] on line 83 | ||
*Type: protected [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $top | *Type: protected [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $top | ||
===$volatile=== | ===$volatile=== | ||
. True if the data is volatile. Defaults to false | . True if the data is volatile. Defaults to false | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/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 | *Type: protected [http://www.php.net/manual/en/language.types.boolean.php boolean ] $volatile | ||
===$attributes=== | ===$attributes=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1797 i2ce/lib/I2CE_MagicDataNode.php] on line 1797 | ||
*Type: protected $attributes | *Type: protected $attributes | ||
Line 75: | Line 75: | ||
===__construct()=== | ===__construct()=== | ||
Construct a new configuration value or grouping. | Construct a new configuration value or grouping. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L190 i2ce/lib/I2CE_MagicDataNode.php] on line 190 | ||
*Signature: protected function __construct($name,$parent,$check_key) | *Signature: protected function __construct($name,$parent,$check_key) | ||
*Parameters: | *Parameters: | ||
Line 86: | Line 86: | ||
===__get()=== | ===__get()=== | ||
Get the value for a child configuration option. | Get the value for a child configuration option. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1054 i2ce/lib/I2CE_MagicDataNode.php] on line 1054 | ||
*Signature: public function __get($path) | *Signature: public function __get($path) | ||
*Parameters: | *Parameters: | ||
Line 93: | Line 93: | ||
===__isset()=== | ===__isset()=== | ||
Check to see if a given key or path exists and the value is set | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1154 i2ce/lib/I2CE_MagicDataNode.php] on line 1154 | ||
*Signature: public function __isset($path) | *Signature: public function __isset($path) | ||
*Parameters: | *Parameters: | ||
Line 99: | Line 99: | ||
===__set()=== | ===__set()=== | ||
Set the value for a child configuration option. | Set the value for a child configuration option. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1023 i2ce/lib/I2CE_MagicDataNode.php] on line 1023 | ||
*Signature: public function __set($path,$value) | *Signature: public function __set($path,$value) | ||
*Parameters: | *Parameters: | ||
Line 105: | Line 105: | ||
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value | ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value | ||
===__toString()=== | ===__toString()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1460 i2ce/lib/I2CE_MagicDataNode.php] on line 1460 | ||
*Signature: public function __toString() | *Signature: public function __toString() | ||
===__unset()=== | ===__unset()=== | ||
Unset a given key in the children array. | Unset a given key in the children array. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1246 i2ce/lib/I2CE_MagicDataNode.php] on line 1246 | ||
*Signature: final public function __unset($key) | *Signature: final public function __unset($key) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $key | ** [http://www.php.net/manual/en/language.types.string.php string ] $key | ||
===_getAsArray()=== | ===_getAsArray()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1437 i2ce/lib/I2CE_MagicDataNode.php] on line 1437 | ||
*Signature: protected function _getAsArray($locale) | *Signature: protected function _getAsArray($locale) | ||
*Parameters: | *Parameters: | ||
Line 120: | Line 120: | ||
***Default Value: null | ***Default Value: null | ||
===_getAttribute()=== | ===_getAttribute()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1837 i2ce/lib/I2CE_MagicDataNode.php] on line 1837 | ||
*Signature: protected function _getAttribute($key,$prefix) | *Signature: protected function _getAttribute($key,$prefix) | ||
*Parameters: | *Parameters: | ||
Line 126: | Line 126: | ||
**$prefix | **$prefix | ||
===_getAttributes()=== | ===_getAttributes()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1894 i2ce/lib/I2CE_MagicDataNode.php] on line 1894 | ||
*Signature: protected function _getAttributes($keys_only,$prefix) | *Signature: protected function _getAttributes($keys_only,$prefix) | ||
*Parameters: | *Parameters: | ||
Line 132: | Line 132: | ||
**$prefix | **$prefix | ||
===_hasAttribute()=== | ===_hasAttribute()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1810 i2ce/lib/I2CE_MagicDataNode.php] on line 1810 | ||
*Signature: protected function _hasAttribute($key,$prefix) | *Signature: protected function _hasAttribute($key,$prefix) | ||
*Parameters: | *Parameters: | ||
Line 138: | Line 138: | ||
**$prefix | **$prefix | ||
===_removeAttribute()=== | ===_removeAttribute()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1868 i2ce/lib/I2CE_MagicDataNode.php] on line 1868 | ||
*Signature: protected function _removeAttribute($prefix,$key) | *Signature: protected function _removeAttribute($prefix,$key) | ||
*Parameters: | *Parameters: | ||
Line 144: | Line 144: | ||
**$key | **$key | ||
===_setAttribute()=== | ===_setAttribute()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1943 i2ce/lib/I2CE_MagicDataNode.php] on line 1943 | ||
*Signature: protected function _setAttribute($key,$val,$prefix) | *Signature: protected function _setAttribute($key,$val,$prefix) | ||
*Parameters: | *Parameters: | ||
Line 152: | Line 152: | ||
===checkKey()=== | ===checkKey()=== | ||
Check to make sure a given key is valid. It can be any combination of _-+.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L125 i2ce/lib/I2CE_MagicDataNode.php] on line 125 | ||
*Signature: static public function checkKey($key) | *Signature: static public function checkKey($key) | ||
*Parameters: | *Parameters: | ||
Line 158: | Line 158: | ||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | ||
===count()=== | ===count()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1667 i2ce/lib/I2CE_MagicDataNode.php] on line 1667 | ||
*Signature: public function count() | *Signature: public function count() | ||
===current()=== | ===current()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1683 i2ce/lib/I2CE_MagicDataNode.php] on line 1683 | ||
*Signature: public function current() | *Signature: public function current() | ||
===erase()=== | ===erase()=== | ||
Erases the current node and all of its subnodes from the storage mechanism. | Erases the current node and all of its subnodes from the storage mechanism. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1339 i2ce/lib/I2CE_MagicDataNode.php] on line 1339 | ||
*Signature: public function erase($locale) | *Signature: public function erase($locale) | ||
*Parameters: | *Parameters: | ||
Line 173: | Line 173: | ||
===eraseChildren()=== | ===eraseChildren()=== | ||
Erases all children of the current node and all of its subnodes from the storage mechanism. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1267 i2ce/lib/I2CE_MagicDataNode.php] on line 1267 | ||
*Signature: public function eraseChildren($locale) | *Signature: public function eraseChildren($locale) | ||
*Parameters: | *Parameters: | ||
Line 181: | Line 181: | ||
===getAsArray()=== | ===getAsArray()=== | ||
Return an array of all the child values for this object. | Return an array of all the child values for this object. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1417 i2ce/lib/I2CE_MagicDataNode.php] on line 1417 | ||
*Signature: public function getAsArray($path,$locale) | *Signature: public function getAsArray($path,$locale) | ||
*Parameters: | *Parameters: | ||
Line 191: | Line 191: | ||
===getAttribute()=== | ===getAttribute()=== | ||
Gets an attribute | Gets an attribute | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1832 i2ce/lib/I2CE_MagicDataNode.php] on line 1832 | ||
*Signature: public function getAttribute($key) | *Signature: public function getAttribute($key) | ||
*Parameters: | *Parameters: | ||
Line 198: | Line 198: | ||
===getAttributes()=== | ===getAttributes()=== | ||
Get the attributes | Get the attributes | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1890 i2ce/lib/I2CE_MagicDataNode.php] on line 1890 | ||
*Signature: public function getAttributes($keys_only) | *Signature: public function getAttributes($keys_only) | ||
*Parameters: | *Parameters: | ||
Line 205: | Line 205: | ||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] | *Returns: [http://www.php.net/manual/en/language.types.array.php array ] | ||
===getChildren()=== | ===getChildren()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1785 i2ce/lib/I2CE_MagicDataNode.php] on line 1785 | ||
*Signature: public function getChildren() | *Signature: public function getChildren() | ||
===getKeys()=== | ===getKeys()=== | ||
Return an array of all child keys for this object. | Return an array of all child keys for this object. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1382 i2ce/lib/I2CE_MagicDataNode.php] on line 1382 | ||
*Signature: public function getKeys($path,$attrs) | *Signature: public function getKeys($path,$attrs) | ||
*Parameters: | *Parameters: | ||
Line 219: | Line 219: | ||
===getName()=== | ===getName()=== | ||
Return the name of this configuration setting. | Return the name of this configuration setting. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L180 i2ce/lib/I2CE_MagicDataNode.php] on line 180 | ||
*Signature: public function getName() | *Signature: public function getName() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===getParent()=== | ===getParent()=== | ||
Get the parent magic data node | Get the parent magic data node | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1144 i2ce/lib/I2CE_MagicDataNode.php] on line 1144 | ||
*Signature: public function getParent() | *Signature: public function getParent() | ||
*Returns: [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] | *Returns: [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] | ||
===getPath()=== | ===getPath()=== | ||
Return the full path to this configuration setting. | Return the full path to this configuration setting. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L151 i2ce/lib/I2CE_MagicDataNode.php] on line 151 | ||
*Signature: public function getPath($show_top) | *Signature: public function getPath($show_top) | ||
*Parameters: | *Parameters: | ||
Line 237: | Line 237: | ||
===getSaveValue()=== | ===getSaveValue()=== | ||
Return the direct scalar value for this node. | Return the direct scalar value for this node. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L957 i2ce/lib/I2CE_MagicDataNode.php] on line 957 | ||
*Signature: public function getSaveValue() | *Signature: public function getSaveValue() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===getTranslation()=== | ===getTranslation()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L552 i2ce/lib/I2CE_MagicDataNode.php] on line 552 | ||
*Signature: public function getTranslation($locale,$resolve,$path) | *Signature: public function getTranslation($locale,$resolve,$path) | ||
*Parameters: | *Parameters: | ||
Line 251: | Line 251: | ||
===getTranslations()=== | ===getTranslations()=== | ||
Get the translations for the current node | Get the translations for the current node | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L443 i2ce/lib/I2CE_MagicDataNode.php] on line 443 | ||
*Signature: public function getTranslations($locales_only,$include_default_locale) | *Signature: public function getTranslations($locales_only,$include_default_locale) | ||
*Parameters: | *Parameters: | ||
Line 261: | Line 261: | ||
===getType()=== | ===getType()=== | ||
Return the type of this node. | Return the type of this node. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L766 i2ce/lib/I2CE_MagicDataNode.php] on line 766 | ||
*Signature: public function getType() | *Signature: public function getType() | ||
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>or false on failure | *Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>or false on failure | ||
===getValue()=== | ===getValue()=== | ||
Return the value of this configuration object if the type == 1 and the current object if type is anything else. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L353 i2ce/lib/I2CE_MagicDataNode.php] on line 353 | ||
*Signature: public function getValue() | *Signature: public function getValue() | ||
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] | *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] | ||
===hasAttribute()=== | ===hasAttribute()=== | ||
Checks to see if an attribute is present | Checks to see if an attribute is present | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1805 i2ce/lib/I2CE_MagicDataNode.php] on line 1805 | ||
*Signature: public function hasAttribute($key) | *Signature: public function hasAttribute($key) | ||
*Parameters: | *Parameters: | ||
Line 278: | Line 278: | ||
===hasChildren()=== | ===hasChildren()=== | ||
whether the current key has children or not. this is _not_ whether this has a children or not | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1775 i2ce/lib/I2CE_MagicDataNode.php] on line 1775 | ||
*Signature: public function hasChildren() | *Signature: public function hasChildren() | ||
===isScalar()=== | ===isScalar()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L91 i2ce/lib/I2CE_MagicDataNode.php] on line 91 | ||
*Signature: private function isScalar() | *Signature: private function isScalar() | ||
===is_indeterminate()=== | ===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 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L907 i2ce/lib/I2CE_MagicDataNode.php] on line 907 | ||
*Signature: public function is_indeterminate($path) | *Signature: public function is_indeterminate($path) | ||
*Parameters: | *Parameters: | ||
Line 293: | Line 293: | ||
===is_parent()=== | ===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 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L932 i2ce/lib/I2CE_MagicDataNode.php] on line 932 | ||
*Signature: public function is_parent($path) | *Signature: public function is_parent($path) | ||
*Parameters: | *Parameters: | ||
Line 301: | Line 301: | ||
===is_populated()=== | ===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 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L862 i2ce/lib/I2CE_MagicDataNode.php] on line 862 | ||
*Signature: protected function is_populated($path) | *Signature: protected function is_populated($path) | ||
*Parameters: | *Parameters: | ||
Line 308: | Line 308: | ||
*Returns: boolean.<br/>True if it is a scalar value | *Returns: boolean.<br/>True if it is a scalar value | ||
===is_root()=== | ===is_root()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L881 i2ce/lib/I2CE_MagicDataNode.php] on line 881 | ||
*Signature: public function is_root($path) | *Signature: public function is_root($path) | ||
*Parameters: | *Parameters: | ||
Line 315: | Line 315: | ||
===is_scalar()=== | ===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 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L781 i2ce/lib/I2CE_MagicDataNode.php] on line 781 | ||
*Signature: public function is_scalar($path) | *Signature: public function is_scalar($path) | ||
*Parameters: | *Parameters: | ||
Line 323: | Line 323: | ||
===is_translatable()=== | ===is_translatable()=== | ||
Checked to see if the node referenced is translatable | Checked to see if the node referenced is translatable | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L410 i2ce/lib/I2CE_MagicDataNode.php] on line 410 | ||
*Signature: public function is_translatable($path) | *Signature: public function is_translatable($path) | ||
*Parameters: | *Parameters: | ||
Line 331: | Line 331: | ||
===is_translated()=== | ===is_translated()=== | ||
Checked to see if the node referenced is translated ito the given locale | Checked to see if the node referenced is translated ito the given locale | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L463 i2ce/lib/I2CE_MagicDataNode.php] on line 463 | ||
*Signature: public function is_translated($locale,$path) | *Signature: public function is_translated($locale,$path) | ||
*Parameters: | *Parameters: | ||
Line 339: | Line 339: | ||
*Returns: boolean. | *Returns: boolean. | ||
===key()=== | ===key()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1697 i2ce/lib/I2CE_MagicDataNode.php] on line 1697 | ||
*Signature: public function key() | *Signature: public function key() | ||
===krsort()=== | ===krsort()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L2051 i2ce/lib/I2CE_MagicDataNode.php] on line 2051 | ||
*Signature: public function krsort($sort_flags,$recurse) | *Signature: public function krsort($sort_flags,$recurse) | ||
*Parameters: | *Parameters: | ||
Line 350: | Line 350: | ||
***Default Value: false | ***Default Value: false | ||
===ksort()=== | ===ksort()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L2021 i2ce/lib/I2CE_MagicDataNode.php] on line 2021 | ||
*Signature: public function ksort($sort_flags,$recurse) | *Signature: public function ksort($sort_flags,$recurse) | ||
*Parameters: | *Parameters: | ||
Line 359: | Line 359: | ||
===newAttribute()=== | ===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. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1989 i2ce/lib/I2CE_MagicDataNode.php] on line 1989 | ||
*Signature: protected function newAttribute($key,$save,$prefix) | *Signature: protected function newAttribute($key,$save,$prefix) | ||
*Parameters: | *Parameters: | ||
Line 368: | Line 368: | ||
===newChild()=== | ===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. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L977 i2ce/lib/I2CE_MagicDataNode.php] on line 977 | ||
*Signature: protected function newChild($key,$save) | *Signature: protected function newChild($key,$save) | ||
*Parameters: | *Parameters: | ||
Line 376: | Line 376: | ||
*Returns: [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]]<br/>The child that was created or null on failure | *Returns: [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]]<br/>The child that was created or null on failure | ||
===next()=== | ===next()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1706 i2ce/lib/I2CE_MagicDataNode.php] on line 1706 | ||
*Signature: public function next() | *Signature: public function next() | ||
===offsetExists()=== | ===offsetExists()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1572 i2ce/lib/I2CE_MagicDataNode.php] on line 1572 | ||
*Signature: public function offsetExists($key) | *Signature: public function offsetExists($key) | ||
*Parameters: | *Parameters: | ||
**$key | **$key | ||
===offsetGet()=== | ===offsetGet()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1595 i2ce/lib/I2CE_MagicDataNode.php] on line 1595 | ||
*Signature: public function offsetGet($key) | *Signature: public function offsetGet($key) | ||
*Parameters: | *Parameters: | ||
**$key | **$key | ||
===offsetSet()=== | ===offsetSet()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1621 i2ce/lib/I2CE_MagicDataNode.php] on line 1621 | ||
*Signature: public function offsetSet($key,$val) | *Signature: public function offsetSet($key,$val) | ||
*Parameters: | *Parameters: | ||
Line 395: | Line 395: | ||
**$val | **$val | ||
===offsetUnset()=== | ===offsetUnset()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1643 i2ce/lib/I2CE_MagicDataNode.php] on line 1643 | ||
*Signature: public function offsetUnset($key) | *Signature: public function offsetUnset($key) | ||
*Parameters: | *Parameters: | ||
Line 401: | Line 401: | ||
===pathDivider()=== | ===pathDivider()=== | ||
Return the path divider for this MagicDataNode object | Return the path divider for this MagicDataNode object | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L144 i2ce/lib/I2CE_MagicDataNode.php] on line 144 | ||
*Signature: | *Signature: public function pathDivider() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===pathExists()=== | ===pathExists()=== | ||
Check to see if a given key key or path exists | Check to see if a given key key or path exists | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1180 i2ce/lib/I2CE_MagicDataNode.php] on line 1180 | ||
*Signature: public function pathExists($path) | *Signature: public function pathExists($path) | ||
*Parameters: | *Parameters: | ||
Line 412: | Line 412: | ||
===pop()=== | ===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. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1533 i2ce/lib/I2CE_MagicDataNode.php] on line 1533 | ||
*Signature: public function pop() | *Signature: public function pop() | ||
===populate()=== | ===populate()=== | ||
Populate any stored data based on the storage objects set in the top node. | Populate any stored data based on the storage objects set in the top node. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L267 i2ce/lib/I2CE_MagicDataNode.php] on line 267 | ||
*Signature: protected function populate() | *Signature: protected function populate() | ||
*Returns: true<br/>on success. | *Returns: true<br/>on success. | ||
===push()=== | ===push()=== | ||
Push a value onto the end of a parent/indeterminate node. | Push a value onto the end of a parent/indeterminate node. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1512 i2ce/lib/I2CE_MagicDataNode.php] on line 1512 | ||
*Signature: public function push($val) | *Signature: public function push($val) | ||
*Parameters: | *Parameters: | ||
Line 428: | Line 428: | ||
===raiseError()=== | ===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. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L2124 i2ce/lib/I2CE_MagicDataNode.php] on line 2124 | ||
*Signature: static public function raiseError($message,$type,$redirect) | *Signature: static public function raiseError($message,$type,$redirect) | ||
*Parameters: | *Parameters: | ||
Line 438: | Line 438: | ||
===removeAttribute()=== | ===removeAttribute()=== | ||
Removes an attribute | Removes an attribute | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1863 i2ce/lib/I2CE_MagicDataNode.php] on line 1863 | ||
*Signature: public function removeAttribute($key) | *Signature: public function removeAttribute($key) | ||
*Parameters: | *Parameters: | ||
Line 444: | Line 444: | ||
*Returns: true<br/>if the attribute was removed. false if the attribute did not exist | *Returns: true<br/>if the attribute was removed. false if the attribute did not exist | ||
===removeTranslation()=== | ===removeTranslation()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1298 i2ce/lib/I2CE_MagicDataNode.php] on line 1298 | ||
*Signature: public function removeTranslation($locale) | *Signature: public function removeTranslation($locale) | ||
*Parameters: | *Parameters: | ||
**$locale | **$locale | ||
===renameChild()=== | |||
Renames a child node | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1315 i2ce/lib/I2CE_MagicDataNode.php] on line 1315 | |||
*Signature: public function renameChild($old,$new) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $old | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $new | |||
*Returns: boolean.<br/>True on success, false on failure | |||
===rewind()=== | ===rewind()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1719 i2ce/lib/I2CE_MagicDataNode.php] on line 1719 | ||
*Signature: public function rewind() | *Signature: public function rewind() | ||
===save()=== | ===save()=== | ||
Call all the storage methods associated with this configuration. | Call all the storage methods associated with this configuration. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1472 i2ce/lib/I2CE_MagicDataNode.php] on line 1472 | ||
*Signature: protected function save($recurse) | *Signature: protected function save($recurse) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $recurse <br/>Defaults to false. If true, and we were able to | ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $recurse <br/>Defaults to false. If true, and we were able to save this node, we recrusively save all the populated children of this node as well. | ||
***Default Value: false | ***Default Value: false | ||
===setAttribute()=== | ===setAttribute()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1928 i2ce/lib/I2CE_MagicDataNode.php] on line 1928 | ||
*Signature: public function setAttribute($key,$val) | *Signature: public function setAttribute($key,$val) | ||
*Parameters: | *Parameters: | ||
Line 466: | Line 474: | ||
===setIfIsSet()=== | ===setIfIsSet()=== | ||
If the data referenced by that path is set, we set the value of $data to that data | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1208 i2ce/lib/I2CE_MagicDataNode.php] on line 1208 | ||
*Signature: public function setIfIsSet($data,$path,$as_array) | *Signature: public function setIfIsSet($data,$path,$as_array) | ||
*Parameters: | *Parameters: | ||
Line 476: | Line 484: | ||
===setTranslatable()=== | ===setTranslatable()=== | ||
Sets the translatable attribute for the referenced node @param boolean $transtable. Defaults to true | Sets the translatable attribute for the referenced node @param boolean $transtable. Defaults to true | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L494 i2ce/lib/I2CE_MagicDataNode.php] on line 494 | ||
*Signature: public function setTranslatable($path,$translatable) | *Signature: public function setTranslatable($path,$translatable) | ||
*Parameters: | *Parameters: | ||
Line 485: | Line 493: | ||
*Returns: true<br/>on success, false on failure | *Returns: true<br/>on success, false on failure | ||
===setTranslation()=== | ===setTranslation()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L520 i2ce/lib/I2CE_MagicDataNode.php] on line 520 | ||
*Signature: public function setTranslation($locale,$translation,$path) | *Signature: public function setTranslation($locale,$translation,$path) | ||
*Parameters: | *Parameters: | ||
Line 494: | Line 502: | ||
===setType()=== | ===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. | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L753 i2ce/lib/I2CE_MagicDataNode.php] on line 753 | ||
*Signature: protected function setType($type) | *Signature: protected function setType($type) | ||
*Parameters: | *Parameters: | ||
Line 501: | Line 509: | ||
===setValue()=== | ===setValue()=== | ||
Set the scalar value for this object. | Set the scalar value for this object. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L609 i2ce/lib/I2CE_MagicDataNode.php] on line 609 | ||
*Signature: public function setValue($value,$locale,$set_default_locale) | *Signature: public function setValue($value,$locale,$set_default_locale) | ||
*Parameters: | *Parameters: | ||
Line 512: | Line 520: | ||
===set_parent()=== | ===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 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L835 i2ce/lib/I2CE_MagicDataNode.php] on line 835 | ||
*Signature: public function set_parent($path) | *Signature: public function set_parent($path,$create) | ||
*Parameters: | *Parameters: | ||
**$path | **$path | ||
***Default Value: null | ***Default Value: null | ||
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $create <br/>Create the path if it does not exist. Defaults to false | |||
***Default Value: false | |||
*Returns: boolean.<br/>True on success | *Returns: boolean.<br/>True on success | ||
===set_scalar()=== | ===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 | 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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L806 i2ce/lib/I2CE_MagicDataNode.php] on line 806 | ||
*Signature: public function set_scalar($path) | *Signature: public function set_scalar($path,$create) | ||
*Parameters: | *Parameters: | ||
**$path | **$path | ||
***Default Value: null | ***Default Value: null | ||
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $create <br/>Create the path if it does not exist. Defaults to false | |||
***Default Value: false | |||
*Returns: boolean.<br/>True on success | *Returns: boolean.<br/>True on success | ||
===traverse()=== | ===traverse()=== | ||
Traverse magic data by a given path | Traverse magic data by a given path | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1072 i2ce/lib/I2CE_MagicDataNode.php] on line 1072 | ||
*Signature: public function traverse($path,$create,$return_value) | *Signature: public function traverse($path,$create,$return_value) | ||
*Parameters: | *Parameters: | ||
Line 538: | Line 550: | ||
*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) | *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()=== | ===uksort()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L2081 i2ce/lib/I2CE_MagicDataNode.php] on line 2081 | ||
*Signature: public function uksort($cmp_function,$recurse) | *Signature: public function uksort($cmp_function,$recurse) | ||
*Parameters: | *Parameters: | ||
Line 545: | Line 557: | ||
***Default Value: false | ***Default Value: false | ||
===unpopulate()=== | ===unpopulate()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L220 i2ce/lib/I2CE_MagicDataNode.php] on line 220 | ||
*Signature: public function unpopulate($deep) | *Signature: public function unpopulate($deep,$cleanup) | ||
*Parameters: | *Parameters: | ||
**$deep | **$deep | ||
***Default Value: true | ***Default Value: true | ||
**$cleanup | |||
***Default Value: false | |||
===valid()=== | ===valid()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L1729 i2ce/lib/I2CE_MagicDataNode.php] on line 1729 | ||
*Signature: public function valid() | *Signature: public function valid() | ||
===volatile()=== | ===volatile()=== | ||
Check/set whether this magic data is volatile or not | Check/set whether this magic data is volatile or not | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataNode.php#L105 i2ce/lib/I2CE_MagicDataNode.php] on line 105 | ||
*Signature: public function volatile($volatile) | *Signature: public function volatile($volatile) | ||
*Parameters: | *Parameters: |
Latest revision as of 08:15, 6 May 2015
This article describes the class I2CE_MagicDataNode .
- Implements the interface RecursiveIterator
- Implements the interface SeekableIterator
- Implements the interface ArrayAccess
- Implements the interface Countable
- Child Classes:
- Location: Part of the module I2CE in the package I2CE 4.1-dev
- Source: Defined in the file 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 i2ce/lib/I2CE_MagicDataNode.php on line 60
- Type: protected integer $type
$name
The name of this configuration setting.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 64
- Type: protected string $name
$value
The value of this configuration setting. This is only valid when type = 1.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 69
- Type: protected string $value
$children
All children configuration objects for this configuration group. This is only valid when type = 0
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 73
- Type: protected array $children
$parent
The parent of this configuration.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 77
- Type: protected I2CE_MagicDataNode $parent
$parentPath
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 78
- Type: protected $parentPath
$parentPathTop
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 79
- Type: protected $parentPathTop
$top
The top level of this configuration.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 83
- Type: protected I2CE_MagicDataNode $top
$volatile
. True if the data is volatile. Defaults to false
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 88
- Type: protected boolean $volatile
$attributes
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1797
- Type: protected $attributes
Methods
__construct()
Construct a new configuration value or grouping.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 190
- Signature: protected function __construct($name,$parent,$check_key)
- Parameters:
- string $name
The name of this configuration setting.- Default Value: null
- I2CE_MagicDataNode $parent
The parent of this configuration setting.- Default Value: null
- boolean $check_key
Defaults to true in which case we check that the key is valid.- Default Value: true
- string $name
__get()
Get the value for a child configuration option.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1054
- Signature: public function __get($path)
- Parameters:
- $path
- Returns: mixed.
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 i2ce/lib/I2CE_MagicDataNode.php on line 1154
- Signature: public function __isset($path)
- Parameters:
- mixed $path
{@see traverse()} returns mixed. Booolean true or false if the magic data referenced by the given path is set. null on failure (invalid path)
- mixed $path
__set()
Set the value for a child configuration option.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1023
- Signature: public function __set($path,$value)
- Parameters:
__toString()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1460
- Signature: public function __toString()
__unset()
Unset a given key in the children array.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1246
- Signature: final public function __unset($key)
- Parameters:
- string $key
_getAsArray()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1437
- Signature: protected function _getAsArray($locale)
- Parameters:
- string $locale
The locale we wish to get the values for. Defaults to null meaning we are not getting tranlsated values.- Default Value: null
- string $locale
_getAttribute()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1837
- Signature: protected function _getAttribute($key,$prefix)
- Parameters:
- $key
- $prefix
_getAttributes()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1894
- Signature: protected function _getAttributes($keys_only,$prefix)
- Parameters:
- $keys_only
- $prefix
_hasAttribute()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1810
- Signature: protected function _hasAttribute($key,$prefix)
- Parameters:
- $key
- $prefix
_removeAttribute()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1868
- Signature: protected function _removeAttribute($prefix,$key)
- Parameters:
- $prefix
- $key
_setAttribute()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1943
- 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 i2ce/lib/I2CE_MagicDataNode.php on line 125
- Signature: static public function checkKey($key)
- Parameters:
- string $key
- Returns: boolean
count()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1667
- Signature: public function count()
current()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1683
- Signature: public function current()
erase()
Erases the current node and all of its subnodes from the storage mechanism.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1339
- Signature: public function erase($locale)
- Parameters:
- string $locale
The locale we wish to erase the values for. Defaults to null meaning we erase all values/locales- Default Value: null
- string $locale
- Returns: boolean
true on success
eraseChildren()
Erases all children of the current node and all of its subnodes from the storage mechanism.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1267
- Signature: public function eraseChildren($locale)
- Parameters:
- string $locale
The locale we wish to erase the values for. Defaults to null meaning we erase all values/locales- Default Value: null
- string $locale
- Returns: boolean
true on success
getAsArray()
Return an array of all the child values for this object.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1417
- Signature: public function getAsArray($path,$locale)
- Parameters:
- Returns: array
getAttribute()
Gets an attribute
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1832
- Signature: public function getAttribute($key)
- Parameters:
- string $key
- Returns: mixed
string if the attribute value. null if it does not exist.
getAttributes()
Get the attributes
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1890
- Signature: public function getAttributes($keys_only)
- Parameters:
- boolean $keys_only
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
- boolean $keys_only
- Returns: array
getChildren()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1785
- Signature: public function getChildren()
getKeys()
Return an array of all child keys for this object.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1382
- Signature: public function getKeys($path,$attrs)
- Parameters:
- mixed $path
{@see traverse()}- Default Value: null
- $attrs
- Default Value: false
- mixed $path
- Returns: array
getName()
Return the name of this configuration setting.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 180
- Signature: public function getName()
- Returns: string
getParent()
Get the parent magic data node
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1144
- Signature: public function getParent()
- Returns: I2CE_MagicDataNode
getPath()
Return the full path to this configuration setting.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 151
- Signature: public function getPath($show_top)
- Parameters:
- boolean $show_top
defaults to true if we are to show the parent- Default Value: true
- boolean $show_top
- Returns: string
getSaveValue()
Return the direct scalar value for this node.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 957
- Signature: public function getSaveValue()
- Returns: string
getTranslation()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 552
- 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 i2ce/lib/I2CE_MagicDataNode.php on line 443
- Signature: public function getTranslations($locales_only,$include_default_locale)
- Parameters:
- boolean $locales_only
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
- boolean $include_default_locale
Defaults to true in which case we include the nodes values under the default locale- Default Value: true
- boolean $locales_only
- Returns: array
getType()
Return the type of this node.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 766
- Signature: public function getType()
- Returns: int
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 i2ce/lib/I2CE_MagicDataNode.php on line 353
- Signature: public function getValue()
- Returns: mixed
hasAttribute()
Checks to see if an attribute is present
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1805
- Signature: public function hasAttribute($key)
- Parameters:
- string $key
- Returns: mixed
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 i2ce/lib/I2CE_MagicDataNode.php on line 1775
- Signature: public function hasChildren()
isScalar()
- Defined in 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 i2ce/lib/I2CE_MagicDataNode.php on line 907
- Signature: public function is_indeterminate($path)
- Parameters:
- $path
- Default Value: null
- $path
- Returns: boolean.
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 i2ce/lib/I2CE_MagicDataNode.php on line 932
- Signature: public function is_parent($path)
- Parameters:
- $path
- Default Value: null
- $path
- Returns: boolean.
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 i2ce/lib/I2CE_MagicDataNode.php on line 862
- Signature: protected function is_populated($path)
- Parameters:
- $path
- Default Value: null
- $path
- Returns: boolean.
True if it is a scalar value
is_root()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 881
- Signature: public function is_root($path)
- Parameters:
- $path
- Default Value: null
- $path
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 i2ce/lib/I2CE_MagicDataNode.php on line 781
- Signature: public function is_scalar($path)
- Parameters:
- $path
- Default Value: null
- $path
- Returns: boolean.
True if it is a scalar value
is_translatable()
Checked to see if the node referenced is translatable
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 410
- Signature: public function is_translatable($path)
- Parameters:
- string $path
Defaults to null, meaning the current node.- Default Value: null
- string $path
- Returns: boolean.
is_translated()
Checked to see if the node referenced is translated ito the given locale
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 463
- Signature: public function is_translated($locale,$path)
- Parameters:
- Returns: boolean.
key()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1697
- Signature: public function key()
krsort()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 2051
- Signature: public function krsort($sort_flags,$recurse)
- Parameters:
- $sort_flags
- Default Value: SORT_REGULAR
- $recurse
- Default Value: false
- $sort_flags
ksort()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 2021
- Signature: public function ksort($sort_flags,$recurse)
- Parameters:
- $sort_flags
- Default Value: SORT_REGULAR
- $recurse
- Default Value: false
- $sort_flags
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 i2ce/lib/I2CE_MagicDataNode.php on line 1989
- Signature: protected function newAttribute($key,$save,$prefix)
- Parameters:
- scalar $key
the key - boolean $save
Set to true to not save the parent and attribute - $prefix
- scalar $key
- Returns: mixed.
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 i2ce/lib/I2CE_MagicDataNode.php on line 977
- Signature: protected function newChild($key,$save)
- Parameters:
- scalar $key
If a boolean and true, we add to the end of the array. Otherwise we use the given key as a key. - boolean $save
Set to true to not save the parent after creating this child.- Default Value: TRUE
- scalar $key
- Returns: I2CE_MagicDataNode
The child that was created or null on failure
next()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1706
- Signature: public function next()
offsetExists()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1572
- Signature: public function offsetExists($key)
- Parameters:
- $key
offsetGet()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1595
- Signature: public function offsetGet($key)
- Parameters:
- $key
offsetSet()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1621
- Signature: public function offsetSet($key,$val)
- Parameters:
- $key
- $val
offsetUnset()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1643
- Signature: public function offsetUnset($key)
- Parameters:
- $key
pathDivider()
Return the path divider for this MagicDataNode object
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 144
- Signature: public function pathDivider()
- Returns: string
pathExists()
Check to see if a given key key or path exists
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1180
- Signature: public function pathExists($path)
- Parameters:
- mixed $path
{@see traverse()} returns mixed. Booolean true or false if the magic data referenced by the given path is set. null on failure (invalid path)
- mixed $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 i2ce/lib/I2CE_MagicDataNode.php on line 1533
- Signature: public function pop()
populate()
Populate any stored data based on the storage objects set in the top node.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 267
- Signature: protected function populate()
- Returns: true
on success.
push()
Push a value onto the end of a parent/indeterminate node.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1512
- Signature: public function push($val)
- Parameters:
- mixed $val
- Returns: int
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 i2ce/lib/I2CE_MagicDataNode.php on line 2124
- Signature: static public function raiseError($message,$type,$redirect)
- Parameters:
- $message
- integer $type
The error type.- Default Value: E_USER_NOTICE
- string $redirect
The page to redirect to for critical errors. @global array- Default Value: ""
removeAttribute()
Removes an attribute
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1863
- Signature: public function removeAttribute($key)
- Parameters:
- string $key
- Returns: true
if the attribute was removed. false if the attribute did not exist
removeTranslation()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1298
- Signature: public function removeTranslation($locale)
- Parameters:
- $locale
renameChild()
Renames a child node
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1315
- Signature: public function renameChild($old,$new)
- Parameters:
- Returns: boolean.
True on success, false on failure
rewind()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1719
- Signature: public function rewind()
save()
Call all the storage methods associated with this configuration.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1472
- Signature: protected function save($recurse)
- Parameters:
- boolean $recurse
Defaults to false. If true, and we were able to save this node, we recrusively save all the populated children of this node as well.- Default Value: false
- boolean $recurse
setAttribute()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1928
- 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 i2ce/lib/I2CE_MagicDataNode.php on line 1208
- Signature: public function setIfIsSet($data,$path,$as_array)
- Parameters:
- mixed &$data
where you wish to store the magic data if it is set - mixed $path
{@see traverse()}. Defaults to null which means we get at this node - boolean $as_array
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
- mixed &$data
- Returns: boolean.
true if the value was set
setTranslatable()
Sets the translatable attribute for the referenced node @param boolean $transtable. Defaults to true
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 494
- Signature: public function setTranslatable($path,$translatable)
- Parameters:
- string $path
Defaults to null, meaning the current node- Default Value: null
- $translatable
- Default Value: true
- string $path
- Returns: true
on success, false on failure
setTranslation()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 520
- 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 i2ce/lib/I2CE_MagicDataNode.php on line 753
- Signature: protected function setType($type)
- Parameters:
- integer $type
- Returns: boolean
true on success
setValue()
Set the scalar value for this object.
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 609
- Signature: public function setValue($value,$locale,$set_default_locale)
- Parameters:
- Returns: true
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 i2ce/lib/I2CE_MagicDataNode.php on line 835
- Signature: public function set_parent($path,$create)
- Parameters:
- $path
- Default Value: null
- boolean $create
Create the path if it does not exist. Defaults to false- Default Value: false
- $path
- Returns: boolean.
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 i2ce/lib/I2CE_MagicDataNode.php on line 806
- Signature: public function set_scalar($path,$create)
- Parameters:
- $path
- Default Value: null
- boolean $create
Create the path if it does not exist. Defaults to false- Default Value: false
- $path
- Returns: boolean.
True on success
traverse()
Traverse magic data by a given path
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1072
- Signature: public function traverse($path,$create,$return_value)
- Parameters:
- array $path
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. - boolean $create
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
- boolean $return_value
Defaults to true. If true returns the value of of a leaf node rather than the node itself- Default Value: true
- array $path
- Returns: mixed.
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 i2ce/lib/I2CE_MagicDataNode.php on line 2081
- Signature: public function uksort($cmp_function,$recurse)
- Parameters:
- $cmp_function
- $recurse
- Default Value: false
unpopulate()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 220
- Signature: public function unpopulate($deep,$cleanup)
- Parameters:
- $deep
- Default Value: true
- $cleanup
- Default Value: false
- $deep
valid()
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 1729
- Signature: public function valid()
volatile()
Check/set whether this magic data is volatile or not
- Defined in i2ce/lib/I2CE_MagicDataNode.php on line 105
- Signature: public function volatile($volatile)
- Parameters:
- boolean $volatile
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
- boolean $volatile
- Returns: mixed