Submit
Path:
~
/
/
opt
/
psa
/
admin
/
plib
/
modules
/
monitoring
/
vendor
/
mezzio
/
mezzio
/
src
/
Response
/
File Content:
CallableResponseFactoryDecorator.php
<?php declare (strict_types=1); namespace PleskMonitoring\Mezzio\Response; use PleskMonitoring\Psr\Http\Message\ResponseFactoryInterface; use PleskMonitoring\Psr\Http\Message\ResponseInterface; /** * @internal * @deprecated Will be removed with v4.0.0 */ final class CallableResponseFactoryDecorator implements ResponseFactoryInterface { /** @var callable():ResponseInterface */ private $responseFactory; /** * @param callable():ResponseInterface $responseFactory */ public function __construct(callable $responseFactory) { $this->responseFactory = $responseFactory; } public function createResponse(int $code = 200, string $reasonPhrase = '') : ResponseInterface { return $this->getResponseFromCallable()->withStatus($code, $reasonPhrase); } public function getResponseFromCallable() : ResponseInterface { return ($this->responseFactory)(); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
CallableResponseFactoryDecorator.php
933 bytes
0644
ErrorResponseGeneratorTrait.php
1913 bytes
0644
ServerRequestErrorResponseGenerator.php
1873 bytes
0644
N4ST4R_ID | Naxtarrr