Class: I2CE MagicDataExport Template: Difference between revisions

From IHRIS Wiki
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
This article describes the class ''I2CE_MagicDataExport_Template''.
#REDIRECT [[Class: I2CE_MagicDataExport_Template (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#magicDataExport|magicDataExport]] 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/MagicDataExport/I2CE_MagicDataExport_Template.php modules/MagicDataExport/I2CE_MagicDataExport_Template.php]
*Author: Carl Leitner <litlfred@ibiblio.org>
I2CE_MagicData_Export
==Variables==
===$mainNode===
The top level configurationGroup node
*Type: protected [http://www.php.net/manual/en/class.domnode.php DOMNode ] $mainNode
 
===$metaNode===
The metadata node
*Type: protected [http://www.php.net/manual/en/class.domnode.php DOMNode ] $metaNode
 
==Methods==
===addTextToNode()===
*Signature: protected function addTextToNode($node,$nodeName,$text)
*Parameters:
**$node
**$nodeName
**$text
===createExport()===
Create an export node by appending on to the given configurationGroup node the values stored in the magic data. @param I2CE_MagicDataNode $conig.  The data we wish to store at this node
*Signature: public function createExport($configNode,$config,$pipe,$configType,$status)
*Parameters:
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode <br/>A configurationGroup node.
**$config
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $pipe <br/>A path component or an array of path components relative to the $config. If the pipe is a non-empty array, we export only the keys specifed by the lowest member of $pipe, if it exists.  Otherwise, if the pipe is empty or null, we export all keys.  Defaults to empty array
***Default Value: null
** [http://www.php.net/manual/en/language.types.string.php string ] $configType <br/>Defaults to the empty string.  The configuration type to give the configuration node.
***Default Value: ''
** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>An array of status options we should set for this configuration node.  Defaults to the empty array
***Default Value: array()
===createExportNode()===
Create an export node by appending on to the given configurationGroup node the values stored in the magic data at the specified $key.
*Signature: public function createExportNode($configNode,$config,$pipe,$key,$configType,$status)
*Parameters:
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode <br/>A configurationGroup node.
** [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $config <br/>The data we wish to store at this node
** [http://www.php.net/manual/en/language.types.array.php array ] $pipe <br/>An array of path components relative to the $config. If the pipe is a non-empty array, we export only the keys specifed by the lowest member of $pipe, if it exists.  Otherwise, if the pipe is empty, we export all keys
** [http://www.php.net/manual/en/language.types.string.php string ] $key <br/>The key.  (Warning.  It assumes it exists in the magic data!)
** [http://www.php.net/manual/en/language.types.string.php string ] $configType <br/>Defaults to the empty string.  The configuration type to give the configuration node.
** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>An array of status options we should set for this configuration node.  Defaults to the empty array
===createExportNodeConfiguration()===
Create an configuration node by appending on to the given configurationGroup node the values stored in the magic data at the specified $key. @param I2CE_MagicDataNode $conig.  The data we wish to store at this node
*Signature: public function createExportNodeConfiguration($configNode,$config,$key,$configType,$status)
*Parameters:
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode <br/>A configurationGroup node.
**$config
** [http://www.php.net/manual/en/language.types.string.php string ] $key <br/>The key.  (Warning.  It assumes it exists in the magic data!)
** [http://www.php.net/manual/en/language.types.string.php string ] $configType <br/>Defaults to the empty string.  The configuration type to give the configuration node.
** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>An array of status options we should set for this configuration node.  Defaults to the empty array
===createExportNodeConfigurationGroup()===
Create an configurationGroup node by appending on to the given configurationGroup node the values stored in the magic data at the specified $key.
*Signature: public function createExportNodeConfigurationGroup($configNode,$config,$pipe,$key,$configType,$status)
*Parameters:
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode <br/>A configurationGroup node.
** [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $config <br/>The data we wish to store at this node
** [http://www.php.net/manual/en/language.types.array.php array ] $pipe <br/>An array of path components relative to the $config. If the pipe is a non-empty array, we export only the keys specifed by the lowest member of $pipe, if it exists.  Otherwise, if the pipe is empty, we export all keys
** [http://www.php.net/manual/en/language.types.string.php string ] $key <br/>The key.  (Warning.  It assumes it exists in the magic data!)
** [http://www.php.net/manual/en/language.types.string.php string ] $configType <br/>Defaults to the empty string.  The configuration type to give the configuration node.
** [http://www.php.net/manual/en/language.types.array.php array ] $status <br/>An array of status options we should set for this configuration node.  Defaults to the empty array
===createMetaDataNode()===
Create the meta data node
*Signature: public function createMetaDataNode($options)
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $options <br/>Has the following keys used to set the metadata: 'description','displayName', 'creator','email','link','version'. We also have keys which  'requirement','enable','conflict','path' are themselves arrays containing the data needed to define them.  Each entry of this array corresponds to a sepearte instnce of a node with the given name.  This data is as in the following examples: 'requirement'=>array('I2CE'=>array('atLeast'=>4.3,'lessThan'=>2.2),'blah'=>array('greaterThan'=>4)), 'paths'=>array('templates'=>array('value'=>'./templates')), 'enable'=>array('brower'=>array(),'blah_module'=>array())
===humanText()===
Tries to turn a string (such as a magic data key) into  human text @param $text
*Signature: static public function humanText($text)
*Parameters:
**$text
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===setModule()===
Set the name of the module to be used for export.
*Signature: public function setModule($module,$path)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $module
** [http://www.php.net/manual/en/language.types.string.php string ] $path <br/>Defaults to null.  If set, sets the  path  for the top level configuration group
***Default Value: null
 
 
[[Category:Class Documentation]]

Latest revision as of 09:41, 23 August 2013