lithium\data\source\database\adapter\PostgreSql::connect()
Implements
lithium\data\Source::connect()
Connects to the database by creating a PDO intance using the constructed DSN string. Will set specific options on the connection as provided (timezone, schema).
Returns
booleanReturns true
if a database connection could be established,
otherwise false
.
Source
public function connect() {
if (!parent::connect()) {
return false;
}
if ($this->_config['schema']) {
$this->searchPath($this->_config['schema']);
}
if ($this->_config['timezone']) {
$this->timezone($this->_config['timezone']);
}
return true;
}