mikehaertl\shellcommand\Command::setArgs PHP Метод

setArgs() публичный Метод

public setArgs ( string $args ) : static
$args string the command arguments as string. Note that these will not get escaped!
Результат static for method chaining
    public function setArgs($args)
    {
        $this->_args = array($args);
        return $this;
    }

Usage Example

Пример #1
0
 public function testCanResetArguments()
 {
     $command = new Command();
     $command->addArg('--demo');
     $command->addArg('-name=test');
     $command->setArgs('--arg1=x');
     $this->assertEquals("--arg1=x", $command->getArgs());
 }