Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public function hasRemainingParams()
 {
     return $this->params->count() > 0;
 }