/var/www/vhosts/ihelp.ro/_OLD/vendor/laminas/laminas-httphandlerrunner/src
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php (3322B)
handler = $handler;
$this->emitter = $emitter;
// Factories are cast as Closures to ensure return type safety.
$this->serverRequestFactory = function () use ($serverRequestFactory) : ServerRequestInterface {
return $serverRequestFactory();
};
$this->serverRequestErrorResponseGenerator =
function (Throwable $exception) use ($serverRequestErrorResponseGenerator) : ResponseInterface {
return $serverRequestErrorResponseGenerator($exception);
};
}
/**
* Run the application
*/
public function run() : void
{
try {
$request = ($this->serverRequestFactory)();
} catch (Throwable $e) {
// Error in generating the request
$this->emitMarshalServerRequestException($e);
return;
}
$response = $this->handler->handle($request);
$this->emitter->emit($response);
}
private function emitMarshalServerRequestException(Throwable $exception) : void
{
$response = ($this->serverRequestErrorResponseGenerator)($exception);
$this->emitter->emit($response);
}
}