예제 #1
0
파일: MySQL.php 프로젝트: kaibosh/nZEDb
 /**
  * Constructs the MySQL adapter and sets the default port to 3306.
  *
  * @see lithium\data\source\Database::__construct()
  * @see lithium\data\Source::__construct()
  * @see lithium\data\Connections::add()
  *
  * @param array $config Configuration options for this class. For additional configuration,
  *                      see `lithium\data\source\Database` and `lithium\data\Source`. Available options
  *                      defined by this class:
  *                      - `'database'`: The name of the database to connect to. Defaults to 'lithium'.
  *                      - `'host'`: The IP or machine name where MySQL is running, followed by a colon,
  *                      followed by a port number or socket. Defaults to `'localhost:3306'`.
  *                      - `'persistent'`: If a persistent connection (if available) should be made.
  *                      Defaults to true.
  *                      Typically, these parameters are set in `Connections::add()`, when adding the
  *                      adapter to the list of active connections.
  */
 public function __construct(array $config = [])
 {
     $defaults = ['host' => 'localhost:3306', 'encoding' => null];
     parent::__construct($config + $defaults);
 }