registry = new \Core\Registry; $this->registry->db = $this->getDbConnection(); $this->registry->event = new \Core\Event; } public function getDbConnection() { $db = new \PicoDb\Database(array( 'driver' => 'sqlite', 'filename' => ':memory:' )); if ($db->schema()->check(\Schema\VERSION)) { return $db; } else { die('Unable to migrate database schema!'); } } }