ResultData
class ResultData extends Data implements ExitCodeInterface, OutputDataInterface (View source)
Constants
EXITCODE_OK |
|
EXITCODE_ERROR |
|
EXITCODE_MISSING_OPTIONS |
Symfony Console handles these conditions; Robo returns the status
code selected by Symfony. These are here for documentation purposes. |
EXITCODE_COMMAND_NOT_FOUND |
|
EXITCODE_USER_CANCEL |
The command was aborted because the user chose to cancel it at some prompt. This exit code is arbitrarily the same as EX_TEMPFAIL in sysexits.h, although note that shell error codes are distinct from C exit codes, so this alignment not particularly meaningful. |
Properties
protected string | $message | from Data | |
protected int | $exitCode |
Methods
No description
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
No description
No description
No description
No description
Indicate that the message in this data has already been displayed.
Opt-in to providing the result message as the output data
No description
No description
Details
__construct(int $exitCode = self::EXITCODE_OK, string $message = '', array $data = [])
No description
in
Data at line 30
array
getData()
No description
in
Data at line 38
string
getMessage()
No description
in
Data at line 46
setMessage(string $message)
No description
in
Data at line 60
$this
merge(Data $result)
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
in
Data at line 75
$this
update(ArrayObject $update)
Update the current data with the data provided in the parameter.
Provided data takes precedence.
in
Data at line 99
array
mergeData(array $data)
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
$data['message'] is handled specially, and is appended to $this->message if set.
in
Data at line 109
bool
hasExecutionTime()
No description
in
Data at line 117
null|float
getExecutionTime()
No description
in
Data at line 132
null|float
accumulateExecutionTime(array|float $duration)
Accumulate execution time
in
Data at line 149
string
accumulateMessage(string $message)
Accumulate the message.
static ResultData
message(string $message, array $data = [])
No description
static ResultData
cancelled(string $message = '', array $data = [])
No description
getExitCode()
No description
getOutputData()
No description
alreadyPrinted()
Indicate that the message in this data has already been displayed.
provideOutputdata()
Opt-in to providing the result message as the output data
bool
wasSuccessful()
No description
bool
wasCancelled()
No description