protected function HttpController::getRpcResponses in JSON-RPC 8
Same name and namespace in other branches
- 2.x src/Controller/HttpController.php \Drupal\jsonrpc\Controller\HttpController::getRpcResponses()
Get the JSON RPC request objects for the given JSON RPC request objects.
Parameters
\Drupal\jsonrpc\Object\Request[] $rpc_requests: The RPC request objects.
Return value
\Drupal\jsonrpc\Object\Response[]|null The JSON-RPC response(s). NULL when the RPC request contains only notifications.
Throws
\Drupal\jsonrpc\Exception\JsonRpcException
1 call to HttpController::getRpcResponses()
- HttpController::resolve in src/
Controller/ HttpController.php - Resolves an RPC request over HTTP.
File
- src/
Controller/ HttpController.php, line 147
Class
- HttpController
- The main front controller.
Namespace
Drupal\jsonrpc\ControllerCode
protected function getRpcResponses(array $rpc_requests) {
$rpc_responses = $this->handler
->batch($rpc_requests);
return empty($rpc_responses) ? NULL : $rpc_responses;
}