Class: I2CE MagicDataExport Template: Difference between revisions
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
===addTextToNode()=== | ===addTextToNode()=== | ||
*Signature: protected function addTextToNode($node,$nodeName,$text) | *Signature: protected function addTextToNode($node,$nodeName,$text) | ||
Parameters: | *Parameters: | ||
*$node | *$node | ||
*$nodeName | *$nodeName | ||
*$text | *$text | ||
===createExport()=== | ===createExport()=== | ||
Create an export node by appending on to the given configurationGroup node the values | 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 | ||
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) | *Signature: public function createExport($configNode,$config,$pipe,$configType,$status) | ||
Parameters: | *Parameters: | ||
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode<br/>A configurationGroup node. | ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode <br/>A configurationGroup node. | ||
*$config | *$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 | ** [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 | ***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. | ** [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: '' | ***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 | ** [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() | ***Default Value: array() | ||
===createExportNode()=== | ===createExportNode()=== | ||
Create an export node by appending on to the given configurationGroup node the values | Create an export node by appending on to the given configurationGroup node the values stored in the magic data at the specified $key. | ||
stored in the magic data at the specified $key. | |||
*Signature: public function createExportNode($configNode,$config,$pipe,$key,$configType,$status) | *Signature: public function createExportNode($configNode,$config,$pipe,$key,$configType,$status) | ||
Parameters: | *Parameters: | ||
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode<br/>A configurationGroup node. | ** [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 | ** [[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 | ** [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 ] $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.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 | ** [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()=== | ===createExportNodeConfiguration()=== | ||
Create an configuration node by appending on to the given configurationGroup node the values | 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 | ||
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) | *Signature: public function createExportNodeConfiguration($configNode,$config,$key,$configType,$status) | ||
Parameters: | *Parameters: | ||
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode<br/>A configurationGroup node. | ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode <br/>A configurationGroup node. | ||
*$config | *$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 ] $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.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 | ** [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()=== | ===createExportNodeConfigurationGroup()=== | ||
Create an configurationGroup node by appending on to the given configurationGroup node the values | Create an configurationGroup node by appending on to the given configurationGroup node the values stored in the magic data at the specified $key. | ||
stored in the magic data at the specified $key. | |||
*Signature: public function createExportNodeConfigurationGroup($configNode,$config,$pipe,$key,$configType,$status) | *Signature: public function createExportNodeConfigurationGroup($configNode,$config,$pipe,$key,$configType,$status) | ||
Parameters: | *Parameters: | ||
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $configNode<br/>A configurationGroup node. | ** [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 | ** [[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 | ** [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 ] $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.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 | ** [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()=== | ===createMetaDataNode()=== | ||
Create the meta data node | Create the meta data node | ||
*Signature: public function createMetaDataNode($options) | *Signature: public function createMetaDataNode($options) | ||
Parameters: | *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'. | ** [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()=== | ===humanText()=== | ||
Tries to turn a string (such as a magic data key) into human text | Tries to turn a string (such as a magic data key) into human text @param $text | ||
@param $text | |||
*Signature: static public function humanText($text) | *Signature: static public function humanText($text) | ||
*Parameters: | |||
*$text | |||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===setModule()=== | ===setModule()=== | ||
Set the name of the module to be used for export. | Set the name of the module to be used for export. | ||
*Signature: public function setModule($module,$path) | *Signature: public function setModule($module,$path) | ||
Parameters: | *Parameters: | ||
* [http://www.php.net/manual/en/language.types.string.php string ] $module | ** [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 | ** [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 | ***Default Value: null | ||
==Inherited Variables== | ==Inherited Variables== | ||
===$merges=== | ===$merges=== |
Revision as of 23:42, 16 October 2009
This article desrcibes the class I2CE_MagicDataExport_Template.
- Extends the class: I2CE_MagicDataTemplate.
- Location: Part of the module magicDataExport in the package I2CE
- Source: Defined in the file modules/MagicDataExport/I2CE_MagicDataExport_Template.php
- Author: Carl Leitner <litlfred@ibiblio.org>
I2CE_MagicData_Export
Variables
$mainNode
The top level configurationGroup node
- Type: protected DOMNode $mainNode
$metaNode
The metadata node
- Type: protected 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:
- DOMNode $configNode
A configurationGroup node.
- DOMNode $configNode
- $config
- mixed $pipe
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
- string $configType
Defaults to the empty string. The configuration type to give the configuration node.- Default Value:
- array $status
An array of status options we should set for this configuration node. Defaults to the empty array- Default Value: array()
- mixed $pipe
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:
- DOMNode $configNode
A configurationGroup node. - I2CE_MagicDataNode $config
The data we wish to store at this node - array $pipe
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 - string $key
The key. (Warning. It assumes it exists in the magic data!) - string $configType
Defaults to the empty string. The configuration type to give the configuration node. - array $status
An array of status options we should set for this configuration node. Defaults to the empty array
- DOMNode $configNode
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:
- DOMNode $configNode
A configurationGroup node.
- DOMNode $configNode
- $config
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:
- DOMNode $configNode
A configurationGroup node. - I2CE_MagicDataNode $config
The data we wish to store at this node - array $pipe
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 - string $key
The key. (Warning. It assumes it exists in the magic data!) - string $configType
Defaults to the empty string. The configuration type to give the configuration node. - array $status
An array of status options we should set for this configuration node. Defaults to the empty array
- DOMNode $configNode
createMetaDataNode()
Create the meta data node
- Signature: public function createMetaDataNode($options)
- Parameters:
- array $options
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())
- array $options
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: string
setModule()
Set the name of the module to be used for export.
- Signature: public function setModule($module,$path)
- Parameters:
Inherited Variables
$merges
Theis protected variable is inherited from I2CE_MagicDataTemplate->$merges
$doc
Theis public variable is inherited from I2CE_TemplateMeister->$doc
$xpath
Theis protected variable is inherited from I2CE_TemplateMeister->$xpath
$user
Theis protected variable is inherited from I2CE_TemplateMeister->$user
$working_dir
Theis protected variable is inherited from I2CE_TemplateMeister->$working_dir
$loadOptions
Theis protected variable is inherited from I2CE_TemplateMeister->$loadOptions
$headers
Theis protected variable is inherited from I2CE_TemplateMeister->$headers
$verboseErrors
Theis protected variable is inherited from I2CE_TemplateMeister->$verboseErrors
Inherited Fuzzy Methods
processValues_color_triple_hex_single()
This method is inherited from I2CE_MagicDataTemplate->processValues_color_triple_hex_single()
processValues_color_triple_hex_many()
This method is inherited from I2CE_MagicDataTemplate->processValues_color_triple_hex_many()
processValues_color_triple_rgb_single()
This method is inherited from I2CE_MagicDataTemplate->processValues_color_triple_rgb_single()
processValues_color_triple_rgb_many()
This method is inherited from I2CE_MagicDataTemplate->processValues_color_triple_rgb_many()
processValues_color_hex_single()
This method is inherited from I2CE_MagicDataTemplate->processValues_color_hex_single()
processValues_color_hex_many()
This method is inherited from I2CE_MagicDataTemplate->processValues_color_hex_many()
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()