Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16591 anikendra 1
<?php
2
/**
3
 *
4
 *
5
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
6
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7
 *
8
 * Licensed under The MIT License
9
 * For full copyright and license information, please see the LICENSE.txt
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13
 * @link          http://cakephp.org CakePHP(tm) Project
14
 * @package       app.Config
15
 * @since         CakePHP(tm) v 0.2.9
16
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
17
 */
18
 
19
/**
20
 * Database configuration class.
21
 *
22
 * You can specify multiple configurations for production, development and testing.
23
 *
24
 * datasource => The name of a supported datasource; valid options are as follows:
25
 *  Database/Mysql - MySQL 4 & 5,
26
 *  Database/Sqlite - SQLite (PHP5 only),
27
 *  Database/Postgres - PostgreSQL 7 and higher,
28
 *  Database/Sqlserver - Microsoft SQL Server 2005 and higher
29
 *
30
 * You can add custom database datasources (or override existing datasources) by adding the
31
 * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
32
 *
33
 *
34
 * persistent => true / false
35
 * Determines whether or not the database should use a persistent connection
36
 *
37
 * host =>
38
 * the host you connect to the database. To add a socket or port number, use 'port' => #
39
 *
40
 * prefix =>
41
 * Uses the given prefix for all the tables in this database. This setting can be overridden
42
 * on a per-table basis with the Model::$tablePrefix property.
43
 *
44
 * schema =>
45
 * For Postgres/Sqlserver specifies which schema you would like to use the tables in.
46
 * Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
47
 * the connected user's default schema (typically 'dbo').
48
 *
49
 * encoding =>
50
 * For MySQL, Postgres specifies the character encoding to use when connecting to the
51
 * database. Uses database default not specified.
52
 *
53
 * sslmode =>
54
 * For Postgres specifies whether to 'disable', 'allow', 'prefer', or 'require' SSL for the 
55
 * connection. The default value is 'allow'.
56
 *
57
 * unix_socket =>
58
 * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
59
 *
60
 * settings =>
61
 * Array of key/value pairs, on connection it executes SET statements for each pair
62
 * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
63
 * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
64
 * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
65
 *
66
 * flags =>
67
 * A key/value array of driver specific connection options.
68
 */
69
class DATABASE_CONFIG {
70
 
71
	public $default = array(
72
		'datasource' => 'Database/Mysql',
73
		'persistent' => false,
74
		'host' => 'localhost',
75
		'login' => 'user',
76
		'password' => 'password',
77
		'database' => 'database_name',
78
		'prefix' => '',
79
		//'encoding' => 'utf8',
80
	);
81
 
82
	public $test = array(
83
		'datasource' => 'Database/Mysql',
84
		'persistent' => false,
85
		'host' => 'localhost',
86
		'login' => 'user',
87
		'password' => 'password',
88
		'database' => 'test_database_name',
89
		'prefix' => '',
90
		//'encoding' => 'utf8',
91
	);
92
}