This commit is contained in:
xl
2024-08-29 17:01:08 +08:00
parent 337c52c744
commit c435af1156
15 changed files with 61 additions and 167 deletions
+1 -9
View File
@@ -9,21 +9,13 @@ use Psr\Http\Message\ResponseInterface;
class OtherFormat implements IFormat
{
/**
* @var ResponseInterface
*/
#[Container(ResponseInterface::class)]
public ResponseInterface $response;
/**
* @param mixed $result
* @return ResponseInterface
*/
public function call(mixed $result): ResponseInterface
{
return $this->response->withBody(new Stream($result));
return di(ResponseInterface::class)->withBody(new Stream($result));
}