예제 #1
0
 protected function validateParamsAndArgs()
 {
     $error_out = false;
     # Get the format and make sure it is set to a valid default value
     $format = strtolower($this->getOption('format', 'PHP'));
     $validFormat = in_array($format, self::$outFormats);
     if (!$validFormat) {
         $this->error("--format set to an unrecognized format", 0);
         $error_out = true;
     }
     if ($this->getOption('regex') && $this->getOption('iregex')) {
         $this->error("Can only use either --regex or --iregex");
         $error_out = true;
     }
     parent::validateParamsAndArgs();
     if ($error_out) {
         # Force help and quit
         $this->maybeHelp(true);
     }
 }
예제 #2
0
 function validateParamsAndArgs()
 {
     if (!$this->hasOption('env-checks')) {
         parent::validateParamsAndArgs();
     }
 }