/** * Creates a new setup factory */ public function __construct() { self::$dsn = getenv("DATABASE"); if (!self::$dsn) { self::$dsn = "sqlite://:memory:"; } self::$db = preg_replace('(^([a-z]+).*)', '\\1', self::$dsn); }
/** * Creates a new setup factory. */ public function __construct() { self::$dsn = getenv('DATABASE'); if (!self::$dsn) { self::$dsn = 'sqlite://:memory:'; } self::$db = preg_replace('(^([a-z]+).*)', '\\1', self::$dsn); if (!isset(self::$ioRootDir)) { self::$ioRootDir = $this->createTemporaryDirectory(); } }