mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-03 11:15:04 +02:00
33 lines
659 B
PHP
33 lines
659 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Actions\Http;
|
|
|
|
use App\Contracts\Models\Streamable;
|
|
use App\Contracts\Storage\InteractsWithDisk;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
/**
|
|
* Class StreamAction.
|
|
*/
|
|
abstract class StreamAction implements InteractsWithDisk
|
|
{
|
|
/**
|
|
* Create a new action instance.
|
|
*
|
|
* @param Streamable $streamable
|
|
*/
|
|
public function __construct(protected readonly Streamable $streamable)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Stream the resource.
|
|
*
|
|
* @param string $disposition
|
|
* @return Response
|
|
*/
|
|
abstract public function stream(string $disposition = 'inline'): Response;
|
|
}
|