Class: I2CE MagicDataStorageMemcached (Development): Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
 
Line 2: Line 2:
This article describes the class ''I2CE_MagicDataStorageMemcached'' .
This article describes the class ''I2CE_MagicDataStorageMemcached'' .
*Extends the class: [[Class: I2CE_MagicDataStorage (Development) | I2CE_MagicDataStorage]].
*Extends the class: [[Class: I2CE_MagicDataStorage (Development) | I2CE_MagicDataStorage]].
*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_MagicDataStorageMemcached.php#L34 lib/I2CE_MagicDataStorageMemcached.php] on line 34
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L34 lib/I2CE_MagicDataStorageMemcached.php] on line 34
Configuration class to lookup and save configuration options.
Configuration class to lookup and save configuration options.
==Variables==
==Variables==
===$memcached===
===$memcached===
@protected var Memcached $memcached.  The memcached instance
@protected var Memcached $memcached.  The memcached instance
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L41 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 41
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L41 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 41
*Type: protected $memcached
*Type: protected $memcached


Line 14: Line 14:
===__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_MagicDataStorageMemcached.php#L47 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 47
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L47 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 47
*Signature: public function __construct($name)
*Signature: public function __construct($name)
*Parameters:
*Parameters:
Line 20: Line 20:
===clear()===
===clear()===
Delete all APC keys associated with this storage object.
Delete all APC keys associated with this storage object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L155 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 155
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L224 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 224
*Signature: public function clear()
*Signature: 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
Erases the given I2CE_MagicDataNode from the storage mechanism @param I2CE_MagicDataNode
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L135 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 135
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L204 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 204
*Signature: public function destroy($node)
*Signature: public function destroy($node)
*Parameters:
*Parameters:
Line 31: Line 31:
===getKey()===
===getKey()===
Return the APC prefix for storing variables. @param string $type The variable type (path/type/value/children)
Return the APC prefix for storing variables. @param string $type The variable type (path/type/value/children)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L82 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 82
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L82 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 82
*Signature: public function getKey($node)
*Signature: public function getKey($node,$childPath)
*Parameters:
*Parameters:
**$node  
**$node  
**$childPath
***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_MagicDataStorageMemcached.php#L60 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 60
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L60 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 60
*Signature: public function isAvailable()
*Signature: public function isAvailable()
===renameChild()===
Renames a child node
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L131 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 131
*Signature: public function renameChild($node,$old,$new)
*Parameters:
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $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
===renameDecendents()===
Rename the descenedent children for which we need to rename  its paths
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L160 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 160
*Signature: protected function renameDecendents($node,$children)
*Parameters:
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
** [http://www.php.net/manual/en/language.types.array.php array ] $children <br/>an array of child paths we need to rename its path
===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_MagicDataStorageMemcached.php#L123 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 123
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L192 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 192
*Signature: public function retrieve($node)
*Signature: public function retrieve($node)
*Parameters:
*Parameters:
Line 49: Line 67:
===store()===
===store()===
Store the given I2CE_MagicDataNode into APC
Store the given I2CE_MagicDataNode into APC
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L91 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 91
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMemcached.php#L95 i2ce/lib/I2CE_MagicDataStorageMemcached.php] on line 95
*Signature: public function store($node)
*Signature: public function store($node)
*Parameters:
*Parameters:
Line 55: Line 73:
*Returns: boolean.<br/>True on sucess
*Returns: boolean.<br/>True on sucess
==Inherited Methods==
==Inherited Methods==
===getChildPath()===
This public method is inherited from [[Class: I2CE_MagicDataStorage (Development)#getChildPath() | I2CE_MagicDataStorage->getChildPath()]]
===getHash()===
===getHash()===
This public method is inherited from [[Class: I2CE_MagicDataStorage (Development)#getHash() | I2CE_MagicDataStorage->getHash()]]
This public method is inherited from [[Class: I2CE_MagicDataStorage (Development)#getHash() | I2CE_MagicDataStorage->getHash()]]

Latest revision as of 08:15, 6 May 2015


This article describes the class I2CE_MagicDataStorageMemcached .

Configuration class to lookup and save configuration options.

Variables

$memcached

@protected var Memcached $memcached. The memcached instance

Methods

__construct()

Create a new instance for magic data storage.

clear()

Delete all APC keys associated with this storage object.

destroy()

Erases the given I2CE_MagicDataNode from the storage mechanism @param I2CE_MagicDataNode

getKey()

Return the APC prefix for storing variables. @param string $type The variable type (path/type/value/children)

isAvailable()

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

renameChild()

Renames a child node

renameDecendents()

Rename the descenedent children for which we need to rename its paths

retrieve()

Retrieve the given I2CE_MagicDataNode value and type.

store()

Store the given I2CE_MagicDataNode into APC

Inherited Methods

getChildPath()

This public method is inherited from I2CE_MagicDataStorage->getChildPath()

getHash()

This public method is inherited from I2CE_MagicDataStorage->getHash()

Inherited Variables

$name

Theis protected variable is inherited from I2CE_MagicDataStorage->$name