function onStartCommand(StackDataStore $login) { $fields = $login->getHierarchy(); $this->resourceIndex = @mysqli_connect($fields[self::DB_SERVER], $fields[self::DB_USERNAME], $fields[self::DB_PASSWORD]); if (!$this->resourceIndex) { return false; } return true; }
function onStartCommand(StackDataStore $login) { $fields = $login->getHierarchy(); if (!$fields[self::DB_USE_EXTRAS]) { $this->resourceIndex = new \SQLite3($fields[self::DB_FILE]); } else { $this->resourceIndex = new \SQLite3($fields[self::DB_FILE], $fields[self::DB_OPTIONS], $fields[self::DB_ENCRYPT_KEY]); } return true; }