For example:
$command = Command::fromString('cat /etc/hosts | grep localhost');
Is roughly equivalent to:
$command = Command::create('cat', array('/etc/hosts'))
->pipe(Command::create('grep', array('localhost')));
public static fromString ( string $commandString ) : Clinner\Command\CommandInterface | ||
$commandString | string | The command string to parse. |
Результат | Clinner\Command\CommandInterface |