Files
kiri-router/src/Format/OtherFormat.php
T
2024-08-29 17:01:08 +08:00

22 lines
410 B
PHP

<?php
namespace Kiri\Router\Format;
use Kiri\Di\Inject\Container;
use Kiri\Router\Constrict\Stream;
use Psr\Http\Message\ResponseInterface;
class OtherFormat implements IFormat
{
/**
* @param mixed $result
* @return ResponseInterface
*/
public function call(mixed $result): ResponseInterface
{
return di(ResponseInterface::class)->withBody(new Stream($result));
}
}