lithium\data\source\database\adapter\MySql::__construct PHP 메소드

__construct() 공개 메소드

Constructor. Constructs the MySQL adapter and sets the default port to 3306.
또한 보기: lithium\data\source\Database::__construct()
또한 보기: lithium\data\Source::__construct()
또한 보기: lithium\data\Connections::add()
public __construct ( array $config = [] ) : void
$config array The available configuration options are the following. Further options are inherited from the parent classes. Typically, these parameters are set in `Connections::add()`, when adding the adapter to the list of active connections. - `'host'` _string_: Defaults to `'localhost:3306'`.
리턴 void
    public function __construct(array $config = array())
    {
        $defaults = array('host' => 'localhost:3306');
        parent::__construct($config + $defaults);
    }

Usage Example

예제 #1
0
 public function __construct(array $config = array())
 {
     parent::__construct($config);
     $this->connection = $this;
 }