Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Library/MongoDB #2378

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions application/config/mongo_db.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
* Licensed under the Academic Free License version 3.0
*
* This source file is subject to the Academic Free License (AFL 3.0) that is
* bundled with this package in the files license_afl.txt / license_afl.rst.
* It is also available through the world wide web at this URL:
* http://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to obtain it
* through the world wide web, please send an email to
* licensing@ellislab.com so we can send you a copy immediately.
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/)
* @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
* @link http://codeigniter.com
* @since Version 3.0
* @filesource
*/
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your MongoDB
| database.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['port'] The port to connect to the server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['host_db_flag'] Whether to append database flag while building dsn
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['result_set'] The return format of the result set: array, object
| ['options'] The options while performing database queries:
| ['write_concern'] See: http://www.php.net/manual/en/mongo.writeconcerns.php
| ['fsync'] See: http://www.php.net/manual/en/mongocollection.insert.php
| ['timeout'] See: http://www.php.net/manual/en/mongocursor.timeout.php
| ['autoinit'] Whether or not to automatically initialize the database.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
*/

$config['active_group'] = 'default';

$config['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'port' => 27017,
'username' => '',
'password' => '',
'database' => '',
'host_db_flag' => FALSE,
'db_debug' => FALSE,
'result_set' => 'array',
'options' => array(
'write_concern' => 1,
'fsync' => FALSE,
'timeout' => 10000
),
'autoinit' => TRUE,
);
Loading