namespace OC\L10N;
-use Ds\Set;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IUser;
protected $availableLanguages = [];
/**
- * @var Set
+ * @var array
*/
- protected $localeCache;
+ protected $localeCache = [];
/**
* @var array
$this->request = $request;
$this->userSession = $userSession;
$this->serverRoot = $serverRoot;
- $this->localeCache = new Set();
}
/**
return true;
}
- if ($this->localeCache->isEmpty()) {
+ if ($this->localeCache === []) {
$locales = $this->findAvailableLocales();
foreach ($locales as $l) {
- $this->localeCache->add($l['code']);
+ $this->localeCache[$l['code']] = true;
}
}
- return $this->localeCache->contains($locale);
+ return isset($this->localeCache[$locale]);
}
/**