function ProcessOutputCallback::parseJsonOutput
Gets the parsed JSON output.
Return value
mixed The decoded JSON output or NULL if there isn't any.
File
-
core/
modules/ package_manager/ src/ ProcessOutputCallback.php, line 83
Class
- ProcessOutputCallback
- A process callback for capturing output.
Namespace
Drupal\package_managerCode
public function parseJsonOutput() : mixed {
$output = $this->getOutput();
if ($output) {
return json_decode(trim(implode('', $output)), TRUE, flags: JSON_THROW_ON_ERROR);
}
return NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.