Example #1
0
 case '-mt':
     if (!preg_match('/^[0-9]+$/', $cliarg = array_shift($cliargs))) {
         echo "{$cliargOrig} must be followed by a number.\n" . $syntax;
         exit(1);
     }
     $processor->setMaxTreeSize(intval($cliarg));
     break;
 case '-ds':
     $processor->setDS($cliarg = array_shift($cliargs));
     break;
 case '-td':
     if (!preg_match('/^[0-9]+$/', $cliarg = array_shift($cliargs))) {
         echo "{$cliargOrig} must be followed by a number.\n" . $syntax;
         exit(1);
     }
     $processor->setTop100Depth(intval($cliarg));
     break;
 case '-n':
     $processor->setName($cliarg = array_shift($cliargs));
     break;
 case '-l':
     if (!preg_match('/^[0-9]+$/', $cliarg = array_shift($cliargs))) {
         echo "{$cliargOrig} must be followed by a number.\n" . $syntax;
         exit(1);
     }
     $processor->setMaxLineLength(intval($cliarg));
     break;
 case '-q':
     $processor->setVerboseLevel(PROCESS_VERBOSE_QUIET);
     break;
 case '-v':
Example #2
0
     break;
 case '-nt':
     $processor->setNoTree(TRUE);
     break;
 case '-mt':
     $processor->setMaxTreeSize(intval($shifted = array_shift($cliargs)));
     if (!preg_match('/^[0-9]+$/', $shifted)) {
         echo "{$cliarg} must be followed by a number.\n";
     }
     exit(1);
     break;
 case '-ds':
     $processor->setDS($shifted = array_shift($cliargs));
     break;
 case '-td':
     $processor->setTop100Depth(intval($shifted = array_shift($cliargs)));
     if (!preg_match('/^[0-9]+$/', $shifted)) {
         echo "{$cliarg} must be followed by a number.\n";
     }
     exit(1);
     break;
 case '-n':
     $processor->setName($shifted = array_shift($cliargs));
     break;
 case '-l':
     $processor->setMaxLineLength(intval($shifted = array_shift($cliargs)));
     if (!preg_match('/^[0-9]+$/', $shifted)) {
         echo "{$cliarg} must be followed by a number.\n";
     }
     exit(1);
     break;