TYPO3
7.6
|
Public Member Functions | |
run (OutputInterface $output, $cmd, $error=null, $callback=null, $verbosity=OutputInterface::VERBOSITY_VERY_VERBOSE) | |
mustRun (OutputInterface $output, $cmd, $error=null, $callback=null) | |
wrapCallback (OutputInterface $output, Process $process, $callback=null) | |
escapeString ($str) | |
getName () | |
Public Member Functions inherited from Helper | |
setHelperSet (HelperSet $helperSet=null) | |
getHelperSet () | |
Additional Inherited Members | |
Static Public Member Functions inherited from Helper | |
static | strlen ($string) |
static | formatTime ($secs) |
static | formatMemory ($memory) |
static | strlenWithoutDecoration (OutputFormatterInterface $formatter, $string) |
Protected Attributes inherited from Helper | |
$helperSet = null | |
The ProcessHelper class provides helpers to run external processes.
Definition at line 24 of file ProcessHelper.php.
escapeString | ( | $str | ) |
This method is public for PHP 5.3 compatibility, it should be private.
Definition at line 130 of file ProcessHelper.php.
Referenced by ProcessHelper\run().
getName | ( | ) |
{Returns the canonical name of this helper.
Implements HelperInterface.
Definition at line 138 of file ProcessHelper.php.
mustRun | ( | OutputInterface | $output, |
$cmd, | |||
$error = null , |
|||
$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.
OutputInterface | $output | An OutputInterface instance |
string | Process | $cmd | An instance of Process or a command to run |
string | null | $error | An error message that must be displayed if something went wrong |
callable | null | $callback | A PHP callback to run whenever there is some output available on STDOUT or STDERR |
ProcessFailedException |
Definition at line 90 of file ProcessHelper.php.
References ProcessHelper\run().
run | ( | OutputInterface | $output, |
$cmd, | |||
$error = null , |
|||
$callback = null , |
|||
$verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE |
|||
) |
Runs an external process.
OutputInterface | $output | An OutputInterface instance |
string | array | Process | $cmd | An instance of Process or an array of arguments to escape and run or a command to run |
string | null | $error | An error message that must be displayed if something went wrong |
callable | null | $callback | A PHP callback to run whenever there is some output available on STDOUT or STDERR |
int | $verbosity | The threshold for verbosity |
Definition at line 38 of file ProcessHelper.php.
References elseif, ProcessHelper\escapeString(), Helper\getHelperSet(), ProcessHelper\wrapCallback(), OutputInterface\write(), and OutputInterface\writeln().
Referenced by ProcessHelper\mustRun().
wrapCallback | ( | OutputInterface | $output, |
Process | $process, | ||
$callback = null |
|||
) |
Wraps a Process callback to add debugging output.
OutputInterface | $output | An OutputInterface interface |
Process | $process | The Process |
callable | null | $callback | A PHP callable |
Definition at line 110 of file ProcessHelper.php.
References Helper\getHelperSet(), and OutputInterface\write().
Referenced by ProcessHelper\run().