function _drush_backend_get_stdin

8.0.x _drush_backend_get_stdin()
6.x _drush_backend_get_stdin()
7.x _drush_backend_get_stdin()
3.x _drush_backend_get_stdin()
4.x _drush_backend_get_stdin()
5.x _drush_backend_get_stdin()
master _drush_backend_get_stdin()

Read options fron STDIN during POST requests.

This function will read any text from the STDIN pipe, and attempts to generate an associative array if valid JSON was received.

Return value

An associative array of options, if successfull. Otherwise FALSE.

1 call to _drush_backend_get_stdin()
_drush_bootstrap_drush in includes/
Initial Drush bootstrap phase.


includes/, line 647
Drush backend API


function _drush_backend_get_stdin() {
  $fp = fopen('php://stdin', 'r');
  stream_set_blocking($fp, FALSE);
  $string = stream_get_contents($fp);
  if (trim($string)) {
    return json_decode($string, TRUE);
  return FALSE;