pictcode / lib / Cake / Console / Templates / skel / Config / database.php.default @ 22fd3a57
履歴 | 表示 | アノテート | ダウンロード (2.483 KB)
| 1 | <?php | 
|---|---|
| 2 | /** | 
| 3 | * @link http://cakephp.org CakePHP(tm) Project | 
| 4 | * @package app.Config | 
| 5 | * @since CakePHP(tm) v 0.2.9 | 
| 6 | */ | 
| 7 |  | 
| 8 | /** | 
| 9 | * Database configuration class. | 
| 10 | * You can specify multiple configurations for production, development and testing. | 
| 11 | * | 
| 12 | * datasource => The name of a supported datasource; valid options are as follows: | 
| 13 | * Database/Mysql - MySQL 4 & 5, | 
| 14 | * Database/Sqlite - SQLite (PHP5 only), | 
| 15 | * Database/Postgres - PostgreSQL 7 and higher, | 
| 16 | * Database/Sqlserver - Microsoft SQL Server 2005 and higher | 
| 17 | * | 
| 18 | * You can add custom database datasources (or override existing datasources) by adding the | 
| 19 | * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php', | 
| 20 | * | 
| 21 | * | 
| 22 | * persistent => true / false | 
| 23 | * Determines whether or not the database should use a persistent connection | 
| 24 | * | 
| 25 | * host => | 
| 26 | * the host you connect to the database. To add a socket or port number, use 'port' => # | 
| 27 | * | 
| 28 | * prefix => | 
| 29 | * Uses the given prefix for all the tables in this database. This setting can be overridden | 
| 30 | * on a per-table basis with the Model::$tablePrefix property. | 
| 31 | * | 
| 32 | * schema => | 
| 33 | * 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 | 
| 34 | * the connected user's default schema (typically 'dbo'). | 
| 35 | * | 
| 36 | * encoding => | 
| 37 | * For MySQL, Postgres specifies the character encoding to use when connecting to the | 
| 38 | * database. Uses database default not specified. | 
| 39 | * | 
| 40 | * unix_socket => | 
| 41 | * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port` | 
| 42 | * | 
| 43 | * settings => | 
| 44 | * Array of key/value pairs, on connection it executes SET statements for each pair | 
| 45 | * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html | 
| 46 | * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html | 
| 47 | * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx | 
| 48 | * | 
| 49 | * flags => | 
| 50 | * A key/value array of driver specific connection options. | 
| 51 | */ | 
| 52 | class DATABASE_CONFIG {
 | 
| 53 |  | 
| 54 | public $default = array( | 
| 55 | 'datasource' => 'Database/Mysql', | 
| 56 | 'persistent' => false, | 
| 57 | 'host' => 'localhost', | 
| 58 | 'login' => 'user', | 
| 59 | 'password' => 'password', | 
| 60 | 'database' => 'database_name', | 
| 61 | 'prefix' => '', | 
| 62 | //'encoding' => 'utf8', | 
| 63 | ); | 
| 64 |  | 
| 65 | public $test = array( | 
| 66 | 'datasource' => 'Database/Mysql', | 
| 67 | 'persistent' => false, | 
| 68 | 'host' => 'localhost', | 
| 69 | 'login' => 'user', | 
| 70 | 'password' => 'password', | 
| 71 | 'database' => 'test_database_name', | 
| 72 | 'prefix' => '', | 
| 73 | //'encoding' => 'utf8', | 
| 74 | ); | 
| 75 | } |