예제 #1
0
 /**
  * @param InvokableParams $params
  */
 protected function process(InvokableParams $params)
 {
     $opts = new Options('args', function ($option_name, $option_value) {
         return "{$option_value}";
     });
     $opts->invokeProcess($params);
 }
예제 #2
0
 /**
  * @param InvokableParams $params
  */
 protected function process(InvokableParams $params)
 {
     $opts = new Options('long-options', function ($option_name, $option_value) {
         $flag = "--{$option_name}";
         if (null === $option_value) {
             return $flag;
         }
         return "{$flag}={$option_value}";
     });
     $opts->invokeProcess($params);
 }