addArguments() public method

The existing arguments are preserved.
See also: setArgument()
public addArguments ( array $arguments ) : static
$arguments array The argument values indexed by the argument names or their 0-based positions in the argument list.
return static The current instance.
示例#1
0
 public function testAddArguments()
 {
     $format = ArgsFormat::build()->addArgument(new Argument('argument1'))->addArgument(new Argument('argument2'))->addArgument(new Argument('argument3'))->getFormat();
     $args = new Args($format);
     $args->setArgument('argument1', 'value1');
     $args->addArguments(array('argument2' => 'value2', 'argument3' => 'value3'));
     $this->assertSame(array('argument1' => 'value1', 'argument2' => 'value2', 'argument3' => 'value3'), $args->getArguments());
 }