예제 #1
0
파일: Cli.php 프로젝트: kobmaki/icingaweb2
 protected function parseBasicParams()
 {
     $this->params = Params::parse();
     if ($this->params->shift('help')) {
         $this->params->unshift('help');
     }
     if ($this->params->shift('autocomplete')) {
         $this->params->unshift('autocomplete');
     }
     $watch = $this->params->shift('watch');
     if ($watch === true) {
         $watch = 5;
     }
     if (preg_match('~^\\d+$~', $watch)) {
         $this->watchTimeout = (int) $watch;
     }
     $this->debug = (int) $this->params->get('debug');
     $this->verbose = (int) $this->params->get('verbose');
     $this->showBenchmark = (bool) $this->params->shift('benchmark');
     return $this;
 }
예제 #2
0
 public function hasRemainingParams()
 {
     return $this->params->count() > 0;
 }