ProcessHelper
class ProcessHelper extends Helper
The ProcessHelper class provides helpers to run external processes.
Methods
from Helper
static int
strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
from Helper
static
from Helper
run(OutputInterface $output, string|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
in Helper at line line 30
setHelperSet(HelperSet $helperSet = null)
Sets the helper set associated with this helper.
in Helper at line line 52
static int
strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
in Helper at line line 61
static
formatTime($secs)
in Helper at line line 88
static
formatMemory($memory)
in Helper at line line 105
static
strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
at line line 39
Process
run(OutputInterface $output, string|array|Process $cmd, string|null $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
Runs an external process.
at line line 95
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.
at line line 115
callable
wrapCallback(OutputInterface $output, Process $process, callable $callback = null)
Wraps a Process callback to add debugging output.
at line line 140
string
getName()
Returns the canonical name of this helper.