Example #1
0
 /**
  * The entry method.
  *
  * @return  void
  */
 public function main()
 {
     $fastcgi = '127.0.0.1:9000';
     while (false !== ($c = $this->getOption($v))) {
         switch ($c) {
             case 'f':
                 $fastcgi = $v;
                 break;
             case 'h':
             case '?':
                 return $this->usage();
             case '__ambiguous':
                 $this->resolveOptionAmbiguity($v);
                 break;
         }
     }
     $this->parser->listInputs($workerPath);
     if (null === $workerPath) {
         return $this->usage();
     }
     $output = Worker\Backend\Shared::start('tcp://' . $fastcgi, $workerPath);
     echo $output, "\n";
     return;
 }