ProcessHelper
class ProcessHelper extends Helper
The ProcessHelper class provides helpers to run external processes.
Properties
protected | $helperSet | from Helper |
Methods
from Helper
static int
strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
from Helper
static string
substr(string $string, int $from, int|null $length = null)
Returns the subset of a string, using mb_substr if it is available.
from Helper
static
from Helper
run(OutputInterface $output, array|Process $cmd, string|null $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
Runs an external process.
mustRun(OutputInterface $output, string|Process $cmd, string|null $error = null, callable $callback = null)
Runs the process.
callable
wrapCallback(OutputInterface $output, Process $process, callable $callback = null)
Wraps a Process callback to add debugging output.
string
getName()
Returns the canonical name of this helper.
Details
static int
strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
static string
substr(string $string, int $from, int|null $length = null)
Returns the subset of a string, using mb_substr if it is available.
Process
run(OutputInterface $output, array|Process $cmd, string|null $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
Runs an external process.
Process
mustRun(OutputInterface $output, string|Process $cmd, string|null $error = null, callable $callback = null)
Runs the process.
This is identical to run() except that an exception is thrown if the process exits with a non-zero exit code.
callable
wrapCallback(OutputInterface $output, Process $process, callable $callback = null)
Wraps a Process callback to add debugging output.