protected function getDsn()
{
if (!$this->dsn) {
$this->dsn = getenv('DATABASE');
if (!$this->dsn) {
$this->dsn = 'sqlite://:memory:';
}
$this->db = preg_replace('(^([a-z]+).*)', '\\1', $this->dsn);
}
return $this->dsn;
}