chore: complete update
This commit is contained in:
29
src/Framework/Http/Responses/StreamResponse.php
Normal file
29
src/Framework/Http/Responses/StreamResponse.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Http\Responses;
|
||||
|
||||
use App\Framework\Http\Headers;
|
||||
use App\Framework\Http\Range;
|
||||
use App\Framework\Http\Response;
|
||||
use App\Framework\Http\Status;
|
||||
|
||||
final readonly class StreamResponse implements Response, Streamable
|
||||
{
|
||||
|
||||
public string $body;
|
||||
|
||||
public function __construct(
|
||||
public Status $status = Status::OK,
|
||||
public Headers $headers = new Headers(),
|
||||
#public mixed $fileContent,
|
||||
|
||||
public string $filePath = '',
|
||||
public int $fileSize = 0,
|
||||
public string $mimeType = 'application/octet-stream',
|
||||
public ?Range $range = null,
|
||||
public MediaType $mediaType = MediaType::UNKNOWN,
|
||||
) {
|
||||
$this->body = '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user