function drush_backend_get_result

8.0.x backend.inc drush_backend_get_result()
6.x backend.inc drush_backend_get_result()
7.x backend.inc drush_backend_get_result()
3.x backend.inc drush_backend_get_result()
4.x backend.inc drush_backend_get_result()
5.x backend.inc drush_backend_get_result()
master backend.inc drush_backend_get_result()

Retrieves the results from the last call to backend_invoke.

@returns array An associative array containing information from the last backend invoke. The keys in the array include:

  • output: This item contains the textual output of the command that was executed.
  • object: Contains the PHP object representation of the result of the command.
  • self: The self object contains the alias record that was used to select the bootstrapped site when the command was executed.
  • error_status: This item returns the error status for the command. Zero means "no error".
  • log: The log item contains an array of log messages from the command execution ordered chronologically. Each log entery is an associative array. A log entry contains following items: o type: The type of log entry, such as 'notice' or 'warning' o message: The log message o timestamp: The time that the message was logged o memory: Available memory at the time that the message was logged o error: The error code associated with the log message (only for log entries whose type is 'error')
  • error_log: The error_log item contains another representation of entries from the log. Only log entries whose 'error' item is set will appear in the error log. The error log is an associative array whose key is the error code, and whose value is an array of messages--one message for every log entry with the same error code.
  • context: The context item contains a representation of all option values that affected the operation of the command, including both the command line options, options set in a drushrc.php configuration files, and options set from the alias record used with the command.
3 calls to drush_backend_get_result()
DrushCommand::execute in lib/Drush/Psysh/DrushCommand.php
drush_backend_output in includes/backend.inc
Print the json-encoded output of this command, including the encoded log records, context information, etc.
drush_handle_command_output in includes/command.inc
Convert the structured output array provided from the Drush command into formatted output. Output is only printed for commands that define 'default-format' &/or 'default-pipe-format'; all other commands are expected to do…

File

includes/backend.inc, line 129
Drush backend API

Code

function drush_backend_get_result() {
  return drush_get_context('BACKEND_RESULT');
}