/** * @param InvokableParams $params */ protected function process(InvokableParams $params) { $opts = new Options('args', function ($option_name, $option_value) { return "{$option_value}"; }); $opts->invokeProcess($params); }
/** * @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); }