Exemplo n.º 1
0
 /**
  *
  * The languageExists function checks if a Language is available or not
  *
  * @param string $language
  *
  * @return boolean
  */
 private function languageExists($language)
 {
     if (array_key_exists("languages", Decoder::yamlParseFile('Config/LanguagesInit.yml'))) {
         //get all languages
         $languages = Decoder::yamlParseFile('Config/LanguagesInit.yml')['languages'];
         //check if language is available
         if (in_array($language, $languages)) {
             return true;
         } else {
             return false;
         }
     } else {
         //throw Exception
         die("Key 'languages' doesn't exist");
     }
 }
Exemplo n.º 2
0
 /**
  *
  * the function returns the srcInit.yml as an array
  *
  * @return array
  */
 public static function srcInit()
 {
     return Decoder::yamlParseFile("Config/SrcInit.yml");
 }