Class: I2CE MagicDataStorage (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_MagicDataStorage}} This article describes the ''abstract'' class ''I2CE_MagicDataStorage'' . *Child Classes: ** [[Class: I2CE_MagicDataStorageAPC (Dev…')
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
** [[Class: I2CE_MagicDataStorageMem (Development) | I2CE_MagicDataStorageMem]]
** [[Class: I2CE_MagicDataStorageMem (Development) | I2CE_MagicDataStorageMem]]
** [[Class: I2CE_MagicDataStorageMemcached (Development) | I2CE_MagicDataStorageMemcached]]
** [[Class: I2CE_MagicDataStorageMemcached (Development) | I2CE_MagicDataStorageMemcached]]
** [[Class: I2CE_MagicDataStorageSysV (Development) | I2CE_MagicDataStorageSysV]]
** [[Class: I2CE_MagicDataStorageMongoDB (Development) | I2CE_MagicDataStorageMongoDB]]
*Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*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.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L30 lib/I2CE_MagicDataStorage.php] on line 30
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L30 lib/I2CE_MagicDataStorage.php] on line 30
Configuration class to lookup and save configuration options.
Configuration class to lookup and save configuration options.
==Variables==
==Variables==
===$name===
===$name===
The name associated with this storage object.
The name associated with this storage object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L35 i2ce/lib/I2CE_MagicDataStorage.php] on line 35
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L35 i2ce/lib/I2CE_MagicDataStorage.php] on line 35
*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


Line 20: Line 20:
===__construct()===
===__construct()===
Create a new instance for magic data storage.
Create a new instance for magic data storage.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L40 i2ce/lib/I2CE_MagicDataStorage.php] on line 40
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L40 i2ce/lib/I2CE_MagicDataStorage.php] on line 40
*Signature: public function __construct($name)
*Signature: public function __construct($name)
*Parameters:
*Parameters:
Line 26: Line 26:
===clear()===
===clear()===
Clear the all keys/values associated with this storage
Clear the all keys/values associated with this storage
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L76 i2ce/lib/I2CE_MagicDataStorage.php] on line 76
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L103 i2ce/lib/I2CE_MagicDataStorage.php] on line 103
*Signature: abstract public function clear()
*Signature: abstract public function clear()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===destroy()===
===destroy()===
Erases the given I2CE_MagicDataNode from the storage mechanism @param I2CE_MagicDataNode @param boolean.  True on sucess
Erases the given I2CE_MagicDataNode from the storage mechanism @param I2CE_MagicDataNode @param boolean.  True on sucess
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L61 i2ce/lib/I2CE_MagicDataStorage.php] on line 61
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L61 i2ce/lib/I2CE_MagicDataStorage.php] on line 61
*Signature: abstract public function destroy($node)
*Signature: abstract public function destroy($node)
*Parameters:
*Parameters:
**$node  
**$node  
===getChildPath()===
Return the md5 Hash of the path of this object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L83 i2ce/lib/I2CE_MagicDataStorage.php] on line 83
*Signature: public function getChildPath($node,$childPath,$show_top)
*Parameters:
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
** [http://www.php.net/manual/en/language.types.string.php string ] $childPath
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $show_top <br/>defaults to true if we are to show the parent
***Default Value: true
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getHash()===
===getHash()===
Return the md5 Hash of the path of this object.
Return the md5 Hash of the path of this object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L68 i2ce/lib/I2CE_MagicDataStorage.php] on line 68
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L69 i2ce/lib/I2CE_MagicDataStorage.php] on line 69
*Signature: public function getHash($node)
*Signature: public function getHash($node,$childPath)
*Parameters:
*Parameters:
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
** [http://www.php.net/manual/en/language.types.string.php string ] $childPath <br/>Defaults to null
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===isAvailable()===
===isAvailable()===
Returns true if this storage mechanism is ready to be used.  false otherwise.
Returns true if this storage mechanism is ready to be used.  false otherwise.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L82 i2ce/lib/I2CE_MagicDataStorage.php] on line 82
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L109 i2ce/lib/I2CE_MagicDataStorage.php] on line 109
*Signature: abstract public function isAvailable()
*Signature: abstract public function isAvailable()
===renameChild()===
Renames a child node.  This is slow
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L117 i2ce/lib/I2CE_MagicDataStorage.php] on line 117
*Signature: abstract public function renameChild($node,$old,$new)
*Parameters:
**$node
** [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
===retrieve()===
===retrieve()===
Retrieve the given I2CE_MagicDataNode value and type.
Retrieve the given I2CE_MagicDataNode value and type.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L54 i2ce/lib/I2CE_MagicDataStorage.php] on line 54
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L54 i2ce/lib/I2CE_MagicDataStorage.php] on line 54
*Signature: abstract public function retrieve($node)
*Signature: abstract public function retrieve($node)
*Parameters:
*Parameters:
Line 55: Line 76:
===store()===
===store()===
Store the given I2CE_MagicDataNode into the database.
Store the given I2CE_MagicDataNode into the database.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L48 i2ce/lib/I2CE_MagicDataStorage.php] on line 48
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorage.php#L48 i2ce/lib/I2CE_MagicDataStorage.php] on line 48
*Signature: abstract public function store($node)
*Signature: abstract public function store($node)
*Parameters:
*Parameters:

Latest revision as of 09:15, 6 May 2015


This article describes the abstract class I2CE_MagicDataStorage .

Configuration class to lookup and save configuration options.

Variables

$name

The name associated with this storage object.

Methods

__construct()

Create a new instance for magic data storage.

clear()

Clear the all keys/values associated with this storage

destroy()

Erases the given I2CE_MagicDataNode from the storage mechanism @param I2CE_MagicDataNode @param boolean. True on sucess

getChildPath()

Return the md5 Hash of the path of this object.

getHash()

Return the md5 Hash of the path of this object.

isAvailable()

Returns true if this storage mechanism is ready to be used. false otherwise.

renameChild()

Renames a child node. This is slow

retrieve()

Retrieve the given I2CE_MagicDataNode value and type.

store()

Store the given I2CE_MagicDataNode into the database.