Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 885 Bytes

README.md

File metadata and controls

34 lines (30 loc) · 885 Bytes

MongoDB Datasource for CakePHP 1.2.x

About

This is a modified MongoDB Datasource originally from Yasushi Ichikawa (ichikaway) for CakePHP 1.2.x

Requirements

PHP >= 5, pecl mongo (http://php.net/mongo)

Installation

To install the driver for use in a single application:

  1. Place file "dbo_mongodb.php" into directory "cakephp/cake/libs/model/datasources/dbo"
  2. Place file "schemaless.php" and "sql_sompatible.php" into directory "cakephp/cake/libs/model/behaviors"

Configuration

<?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)