protected function HttpController::getRpcResponses in JSON-RPC 2.x
Same name and namespace in other branches
- 8 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 209
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;
}