lithium\data\source\database\adapter\Sqlite3::connect()
Implements
lithium\data\Source::connect()
Connects to the database by constructing DSN string and creating a PDO intance using the parent class. Will set specific options on the connection as provided.
Returns
booleanReturns true
if a database connection could be established,
otherwise false
.
Source
public function connect() {
if (!$this->_config['database']) {
throw new ConfigException('No Database configured');
}
if (empty($this->_config['dsn'])) {
$this->_config['dsn'] = sprintf("sqlite:%s", $this->_config['database']);
}
return parent::connect();
}