Class: I2CE MagicDataStorageMongoDB (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_MagicDataStorageMongoDB}} This article describes the class ''I2CE_MagicDataStorageMongoDB'' . *Extends the class: [[Class: I2CE_MagicDataStorage (Deve…')
 
No edit summary
 
Line 2: Line 2:
This article describes the class ''I2CE_MagicDataStorageMongoDB'' .
This article describes the class ''I2CE_MagicDataStorageMongoDB'' .
*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_MagicDataStorageMongoDB.php#L34 lib/I2CE_MagicDataStorageMongoDB.php] on line 34
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L34 lib/I2CE_MagicDataStorageMongoDB.php] on line 34
Configuration class to lookup and save configuration options.
==Variables==
==Variables==
===$mongo===
===$m===
The mongo instance.
, mongodb connection
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L39 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 39
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L39 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 39
*Type: protected Mongo $mongo
*Type: protected $m


===$mongodb===
===$mdb===
The mongo DB instance.
@var protected $m, mongodb
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L43 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 43
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L43 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 43
*Type: protected MongoDB $mongodb
*Type: protected $mdb
 
===$collection===
The mongo db instance collection for this storage.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L47 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 47
*Type: protected MongoCollection $collection


==Methods==
==Methods==
===__construct()===
===__construct()===
Construct the storage object @param $db_name The name of the database to use @param $name The name of the 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_MagicDataStorageMongoDB.php#L54 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 54
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L50 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 50
*Signature: public function __construct($db_name,$name)
*Signature: public function __construct($name)
*Parameters:
*Parameters:
**$db_name
** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name assigned to this storage object
**$name  
===clear()===
===clear()===
Delete the whole MongoDB collection
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_MagicDataStorageMongoDB.php#L163 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 163
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L125 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 125
*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 @param boolean.  True on sucess
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L155 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 155
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L202 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 202
*Signature: public function destroy($node)
*Signature: public function destroy($node)
*Parameters:
*Parameters:
**$node  
**$node  
===isAvailable()===
===isAvailable()===
Returns true if this storage mechanism is ready to be used.  false otherwise.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L78 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 78
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L71 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 71
*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_MagicDataStorageMongoDB.php#L238 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 238
*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_MagicDataStorageMongoDB.php#L263 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 263
*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_MagicDataStorageMongoDB.php#L132 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 132
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L217 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 217
*Signature: public function retrieve($node)
*Signature: public function retrieve($node)
*Parameters:
*Parameters:
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===setupIndices()===
Setup the indices of a config collection @param MongoCollection
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L144 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 144
*Signature: static public function setupIndices($mcoll)
*Parameters:
**$mcoll
===store()===
===store()===
Store the given I2CE_MagicDataNode into MongoDB
Store the given I2CE_MagicDataNode into mongodb
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L84 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 84
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_MagicDataStorageMongoDB.php#L163 i2ce/lib/I2CE_MagicDataStorageMongoDB.php] on line 163
*Signature: public function store($node)
*Signature: public function store($node)
*Parameters:
*Parameters:
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $node
*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_MagicDataStorageMongoDB .

Variables

$m

, mongodb connection

$mdb

@var protected $m, mongodb

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

isAvailable()

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.

setupIndices()

Setup the indices of a config collection @param MongoCollection

store()

Store the given I2CE_MagicDataNode into mongodb

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