2005-07-04 01:07:14 +00:00
|
|
|
<?php
|
2005-10-09 01:56:21 +00:00
|
|
|
/**
|
2009-05-01 21:05:46 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
2013-02-08 11:59:49 +00:00
|
|
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2005-10-09 01:56:21 +00:00
|
|
|
*
|
2005-12-23 21:57:26 +00:00
|
|
|
* Licensed under The MIT License
|
2013-02-08 12:22:51 +00:00
|
|
|
* For full copyright and license information, please see the LICENSE.txt
|
2005-12-23 21:57:26 +00:00
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-10-09 01:56:21 +00:00
|
|
|
*
|
2013-02-08 11:59:49 +00:00
|
|
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2010-01-26 19:18:20 +00:00
|
|
|
* @link http://cakephp.org CakePHP(tm) Project
|
2011-10-14 19:06:36 +00:00
|
|
|
* @package app.Config
|
2008-10-30 17:30:26 +00:00
|
|
|
* @since CakePHP(tm) v 0.2.9
|
2013-05-30 22:11:14 +00:00
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
2013-10-23 02:18:59 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2005-06-05 19:42:54 +00:00
|
|
|
* Database configuration class.
|
2013-10-23 02:18:59 +00:00
|
|
|
*
|
2005-06-05 19:42:54 +00:00
|
|
|
* You can specify multiple configurations for production, development and testing.
|
2005-10-24 09:54:24 +00:00
|
|
|
*
|
2011-11-04 22:07:31 +00:00
|
|
|
* datasource => The name of a supported datasource; valid options are as follows:
|
2013-10-23 02:18:59 +00:00
|
|
|
* Database/Mysql - MySQL 4 & 5,
|
|
|
|
* Database/Sqlite - SQLite (PHP5 only),
|
|
|
|
* Database/Postgres - PostgreSQL 7 and higher,
|
|
|
|
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
|
2007-02-21 17:12:20 +00:00
|
|
|
*
|
2011-11-04 22:07:31 +00:00
|
|
|
* You can add custom database datasources (or override existing datasources) by adding the
|
2013-02-03 19:00:32 +00:00
|
|
|
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
|
2011-03-16 04:14:37 +00:00
|
|
|
*
|
2007-02-21 17:12:20 +00:00
|
|
|
*
|
|
|
|
* persistent => true / false
|
2007-09-24 23:49:54 +00:00
|
|
|
* Determines whether or not the database should use a persistent connection
|
2005-10-24 09:54:24 +00:00
|
|
|
*
|
|
|
|
* host =>
|
2011-01-26 14:03:06 +00:00
|
|
|
* the host you connect to the database. To add a socket or port number, use 'port' => #
|
2005-10-24 09:54:24 +00:00
|
|
|
*
|
2007-02-21 17:12:20 +00:00
|
|
|
* prefix =>
|
2013-02-03 19:00:32 +00:00
|
|
|
* Uses the given prefix for all the tables in this database. This setting can be overridden
|
2007-02-21 17:12:20 +00:00
|
|
|
* on a per-table basis with the Model::$tablePrefix property.
|
|
|
|
*
|
2008-02-03 01:28:43 +00:00
|
|
|
* schema =>
|
2013-10-23 02:18:59 +00:00
|
|
|
* For Postgres/Sqlserver specifies which schema you would like to use the tables in.
|
|
|
|
* Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
|
2013-02-03 19:00:32 +00:00
|
|
|
* the connected user's default schema (typically 'dbo').
|
2008-02-03 01:28:43 +00:00
|
|
|
*
|
|
|
|
* encoding =>
|
2011-01-26 14:03:06 +00:00
|
|
|
* For MySQL, Postgres specifies the character encoding to use when connecting to the
|
|
|
|
* database. Uses database default not specified.
|
2008-02-03 01:28:43 +00:00
|
|
|
*
|
2014-11-15 21:32:17 +00:00
|
|
|
* sslmode =>
|
|
|
|
* For Postgres specifies whether to 'disable', 'allow', 'prefer', or 'require' SSL for the
|
|
|
|
* connection. The default value is 'allow'.
|
|
|
|
*
|
2011-09-16 08:07:22 +00:00
|
|
|
* unix_socket =>
|
|
|
|
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
|
2013-03-07 22:45:42 +00:00
|
|
|
*
|
|
|
|
* settings =>
|
|
|
|
* Array of key/value pairs, on connection it executes SET statements for each pair
|
|
|
|
* For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
|
|
|
|
* For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
|
|
|
|
* For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
|
2013-11-22 02:35:29 +00:00
|
|
|
*
|
|
|
|
* flags =>
|
|
|
|
* A key/value array of driver specific connection options.
|
2005-06-05 19:42:54 +00:00
|
|
|
*/
|
2007-02-21 17:12:20 +00:00
|
|
|
class DATABASE_CONFIG {
|
2008-02-03 01:28:43 +00:00
|
|
|
|
2010-04-04 07:14:14 +00:00
|
|
|
public $default = array(
|
2011-03-16 04:14:37 +00:00
|
|
|
'datasource' => 'Database/Mysql',
|
2007-02-21 17:12:20 +00:00
|
|
|
'persistent' => false,
|
|
|
|
'host' => 'localhost',
|
|
|
|
'login' => 'user',
|
|
|
|
'password' => 'password',
|
2007-10-20 10:14:30 +00:00
|
|
|
'database' => 'database_name',
|
|
|
|
'prefix' => '',
|
2011-08-13 15:10:29 +00:00
|
|
|
//'encoding' => 'utf8',
|
2007-02-21 17:12:20 +00:00
|
|
|
);
|
2008-02-03 01:28:43 +00:00
|
|
|
|
2010-04-04 07:14:14 +00:00
|
|
|
public $test = array(
|
2011-03-16 04:14:37 +00:00
|
|
|
'datasource' => 'Database/Mysql',
|
2007-02-21 17:12:20 +00:00
|
|
|
'persistent' => false,
|
|
|
|
'host' => 'localhost',
|
|
|
|
'login' => 'user',
|
|
|
|
'password' => 'password',
|
2007-10-20 10:14:30 +00:00
|
|
|
'database' => 'test_database_name',
|
|
|
|
'prefix' => '',
|
2011-08-13 15:10:29 +00:00
|
|
|
//'encoding' => 'utf8',
|
2007-02-21 17:12:20 +00:00
|
|
|
);
|
2005-06-05 19:42:54 +00:00
|
|
|
}
|