/** * execute batch requests (post). * * @throws BatchRequestException * * @return Models\Responses\OrtcResponse */ public function batchExecute() { $guzzleRequests = $this->createBatchPostRequests(); $results = Pool::batch($this->guzzleClient, $guzzleRequests, ['pool_size' => $this->request->getOrtcConfig()->getBatchPoolSize()]); if (count($results->getFailures()) > 0) { $batchRequestException = new BatchRequestException(); $batchRequestException->setResults($results); throw $batchRequestException; } $handler = $this->request->getResponseHandler(); return $handler->handle($results); }