|
|
(15 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| This article describes the class ''I2CE_MagicDataTemplate_YAML''.
| | #REDIRECT [[Class: I2CE_MagicDataTemplate_YAML (4.1.7)]] |
| *Extends the class: [[Class: I2CE_MagicDataTemplate | I2CE_MagicDataTemplate]].
| |
| *Parent Classses: [[Class: I2CE_MagicDataTemplate | I2CE_MagicDataTemplate]] [[Class: I2CE_TemplateMeister | I2CE_TemplateMeister]] [[Class: I2CE_Fuzzy | I2CE_Fuzzy]]
| |
| *Location: Part of the module [[I2CE Module List#YAML_spyc|YAML_spyc]] in the package [https://launchpad.net/i2ce I2CE]
| |
| *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/modules/YAML/lib/I2CE_MagicDataTemplate_YAML.php modules/YAML/lib/I2CE_MagicDataTemplate_YAML.php]
| |
| *Author: Carl Leitner <litlfred@ibiblio.org>
| |
| I2CE_MagicDataTemplate_YAML
| |
| ==Variables==
| |
| ===$attributeConversion===
| |
| an array to conver attribbutes for yaml keys in a config data to DOMElement attributes
| |
| *Type: static protected static $attributeConversion
| |
| | |
| ===$optionalNodes===
| |
| an array to convert attribbutes for yaml keys in a config data to optional subnode of a DOMNode
| |
| *Type: static protected static $optionalNodes
| |
| | |
| ==Methods==
| |
| ===convertConfigDataArray()===
| |
| Converts configurationGroup data in an array to its DOM representation.
| |
| *Signature: protected function convertConfigDataArray($data,$name,$node,$status)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $data <br/>The data for the current node
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name for the current node.
| |
| ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $node <br/>The parent node we wish to add onto node
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>The status of the parent node.
| |
| *Returns: booolean<br/>true on success
| |
| ===convertMetaDataArray()===
| |
| Converts the a metadata array to the metadata DOM node.
| |
| *Signature: protected function convertMetaDataArray($data)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $data <br/>for netadata
| |
| *Returns: boolean.<br/>true on sucess
| |
| ===loadFromYAMLArray()===
| |
| Load an array loaded from a YAML config file to the DOM Example of YAML config portion is in sample.yaml
| |
| *Signature: public function loadFromYAMLArray($data)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $data <br/>An array containing configuration data from a YAML config file
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>True on success
| |
| ===processYAML_status()===
| |
| Default processor for a YAML status key,value pair
| |
| *Signature: protected function processYAML_status($key,$val)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $key
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $val $returns mixed. string on success, the text content of the <status> node that should be created. false on failure
| |
| ===processYAML_status_list()===
| |
| Processor for a YAML status key,value pair where $key='list'
| |
| *Signature: protected function processYAML_status_list($key,$val)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $key
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $val $returns mixed. string on success, the text content of the <status> node that should be created. false on failure
| |
| ===processYAML_values_boolean()===
| |
| Process YAML config data where __type ='boolean'
| |
| *Signature: protected function processYAML_values_boolean($values,$status)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $values <br/>The configdata for the key '__values'
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>The status of the configuration node
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array on success containing each value of which will be the content of a <value> node, or false on failure
| |
| ===processYAML_values_delimited()===
| |
| Process YAML config data where __type ='delimited'
| |
| *Signature: protected function processYAML_values_delimited($values,$status)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $values <br/>The configdata for the key '__values'
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>The status of the configuration node
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array on success containing each value of which will be the content of a <value> node, or false on failure
| |
| ===processYAML_values_list()===
| |
| Process YAML config data where __type ='list'
| |
| *Signature: protected function processYAML_values_list($values,$status)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $values <br/>The configdata for the key '__values'
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>The status of the configuration node
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array on success containing each value of which will be the content of a <value> node, or false on failure
| |
| ===processYAML_values_string()===
| |
| Process YAML config data where __type ='string' or is not set
| |
| *Signature: protected function processYAML_values_string($values,$status)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $values <br/>The configdata for the key '__values'
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>The status of the configuration node
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array on success containing each value of which will be the content of a <value> node, or false on failure
| |
| | |
| | |
| [[Category:Class Documentation]]
| |