Advertisement
Guest User

Untitled

a guest
Jun 25th, 2014
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.22 KB | None | 0 0
  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.  * unix_socket =>
  54.  * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
  55.  *
  56.  * settings =>
  57.  * Array of key/value pairs, on connection it executes SET statements for each pair
  58.  * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
  59.  * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
  60.  * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
  61.  *
  62.  * flags =>
  63.  * A key/value array of driver specific connection options.
  64.  */
  65. class DATABASE_CONFIG {
  66.  
  67.     public $default = array(
  68.         'datasource' => 'Database/Postgres',
  69.                 'persistent' => false,
  70.                 'host' => 'localhost',
  71.                 'port' => '5432',
  72.                 'login' => 'cake',
  73.                 'password' => 'cake',
  74.                 'database' => 'website_db',
  75.         //'encoding' => 'utf8',
  76.     );
  77.  
  78.     public $test = array(
  79.         'datasource' => 'Database/Postgres',
  80.                 'persistent' => false,
  81.                 'host' => 'localhost',
  82.                 'port' => '5432',
  83.                 'login' => 'cake',
  84.                 'password' => 'cake',
  85.                 'database' => 'website_db',
  86.         //'encoding' => 'utf8',
  87.     );
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement