Example #1
0
 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.");
     }
 }
Example #2
0
 public function __construct(IConfig $dataSource)
 {
     $this->users = $dataSource->get('users');
     $this->roles = $dataSource->get('roles');
     $this->dataSource = $dataSource;
 }