Пример #1
0
Файл: Tg.php Проект: twhiston/tg
 /**
  * Get the current lib dev state
  */
 public function ds($mode)
 {
     if ($this->testModeInput($mode) === false) {
         $this->yell('must be a valid Mode: ' . implode(' | ', Tg::MODES));
         return;
     }
     if (file_exists(Tg::devLocation())) {
         $yaml = Yaml::parse(file_get_contents(Tg::devLocation()));
         if (array_key_exists($mode, $yaml)) {
             $output = "{$mode} Dev Mode: ";
             $output .= $yaml[$mode] ? 'true' : 'false';
             $this->yell($output);
             return;
         }
     }
     $this->yell("{$mode} Dev Mode: false");
 }
Пример #2
0
Файл: Tg.php Проект: twhiston/tg
 private function getDevConfig()
 {
     if (file_exists(TgRobo::devLocation())) {
         return Yaml::parse(file_get_contents(TgRobo::devLocation()));
     }
     return [];
 }