Download src/Presentation/Response/JsonResponse.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Presentation/Response/JsonResponse.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Presentation/Response/JsonResponse.php
-
curl -L -o JsonResponse.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Presentation/Response/JsonResponse.php
1.09 kB
| declare(strict_types=1); | |
| namespace Presentation\Response; | |
| use Easy\Http\Message\StatusCode; | |
| use Laminas\Diactoros\Exception\InvalidArgumentException; | |
| use Laminas\Diactoros\Exception\UnwritableStreamException; | |
| use Laminas\Diactoros\Exception\UnseekableStreamException; | |
| use Laminas\Diactoros\Response\JsonResponse as BaseJsonResponse; | |
| use Psr\Http\Message\ResponseInterface; | |
| class JsonResponse extends BaseJsonResponse implements ResponseInterface | |
| { | |
| /** | |
| * @inheritDoc | |
| * @param mixed $data | |
| * @param StatusCode $status | |
| * @param array $headers | |
| * @param int $encodingOptions | |
| * @return void | |
| * @throws InvalidArgumentException | |
| * @throws UnwritableStreamException | |
| * @throws UnseekableStreamException | |
| */ | |
| public function __construct( | |
| $data, | |
| StatusCode $status = StatusCode::OK, | |
| array $headers = [], | |
| int $encodingOptions = self::DEFAULT_JSON_FLAGS | |
| ) { | |
| parent::__construct( | |
| $data, | |
| $status->value, | |
| $headers, | |
| $encodingOptions | |
| ); | |
| } | |
| } | |