-
-
Notifications
You must be signed in to change notification settings - Fork 0
ProcessBuilderInterface
Defines a fluent builder responsible for constructing process instances.
Implementations MUST preserve the builder state consistently across chained calls and SHALL return a process configured according to all previously supplied arguments when build() is invoked.
- Full name:
\FastForward\DevTools\Process\ProcessBuilderInterface
Adds an argument to the process being built.
public withArgument(string $argument, ?string $value = null): selfImplementations MUST append or register the provided argument for later use when build() is called. When a non-empty value is provided, the implementation SHALL associate that value with the argument according to its command-building strategy.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$argument |
string | the argument name or token that SHALL be added to the process definition |
$value |
?string | an optional value associated with the argument |
Return Value:
the current builder instance for fluent chaining
Builds a process instance for the specified command.
public build(string $command): \Symfony\Component\Process\ProcessImplementations MUST return a Process configured with the provided command and all arguments previously collected by the builder. The returned process SHOULD be ready for execution by the caller.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$command |
string | the base command that SHALL be used to create the process |
Return Value:
the configured process instance