Class: I2CE MagicDataStorageMongoDB (4.0.4)
This article describes the class I2CE_MagicDataStorageMongoDB .
- Extends the class: I2CE_MagicDataStorage.
- Location: Part of the module I2CE in the package I2CE 4.0.4-release
- Source: Defined in the file lib/I2CE_MagicDataStorageMongoDB.php on line 34
Configuration class to lookup and save configuration options.
Variables
$mongo
The mongo instance.
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 39
- Type: protected Mongo $mongo
$mongodb
The mongo DB instance.
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 43
- Type: protected MongoDB $mongodb
$collection
The mongo db instance collection for this storage.
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 47
- Type: protected MongoCollection $collection
Methods
__construct()
Construct the storage object @param $db_name The name of the database to use @param $name The name of the storage
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 54
- Signature: public function __construct($db_name,$name)
- Parameters:
- $db_name
- $name
clear()
Delete the whole MongoDB collection
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 163
- Signature: public function clear()
- Returns: boolean
destroy()
Erases the given I2CE_MagicDataNode from the storage mechanism @param I2CE_MagicDataNode
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 155
- Signature: public function destroy($node)
- Parameters:
- $node
isAvailable()
Returns true if this storage mechanism is ready to be used. false otherwise.
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 71
- Signature: public function isAvailable()
retrieve()
Retrieve the given I2CE_MagicDataNode value and type.
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 132
- Signature: public function retrieve($node)
- Parameters:
- I2CE_MagicDataNode $node
- Returns: array
store()
Store the given I2CE_MagicDataNode into MongoDB
- Defined in i2ce/lib/I2CE_MagicDataStorageMongoDB.php on line 84
- Signature: public function store($node)
- Parameters:
- I2CE_MagicDataNode $node
- Returns: boolean.
True on sucess
Inherited Methods
getHash()
This public method is inherited from I2CE_MagicDataStorage->getHash()
Inherited Variables
$name
Theis protected variable is inherited from I2CE_MagicDataStorage->$name