private function checkLanguage($currLanguage) { if (!in_array($currLanguage, $this->config->get('available_langs'))) { throw new \Exception("Language \"{$currLanguage}\" is not configured."); } if (in_array($currLanguage, $this->config->get('disabled_langs'))) { throw new \Exception("Language \"{$currLanguage}\" is disabled."); } }
public function __construct(IConfig $dataSource) { $this->users = $dataSource->get('users'); $this->roles = $dataSource->get('roles'); $this->dataSource = $dataSource; }