This is a modified MongoDB Datasource originally from Yasushi Ichikawa (ichikaway) for CakePHP 1.2.x
PHP >= 5, pecl mongo (http://php.net/mongo)
To install the driver for use in a single application:
- Place file "dbo_mongodb.php" into directory "cakephp/cake/libs/model/datasources/dbo"
- Place file "schemaless.php" and "sql_sompatible.php" into directory "cakephp/cake/libs/model/behaviors"
<?php
// app/config/database.php
class DATABASE_CONFIG {
var $default = array(
'driver' => 'mongodb',
'database' => 'sample',
'host' => 'localhost',
'port' => 27017,
);
var $test = array(
'driver' => 'mongodb',
'database' => 'sample',
'host' => 'localhost',
'port' => 27017,
);
}
?>
Special thanks to Yasushi Ichikawa (ichikaway)