Move json renderer

This commit is contained in:
Maarten 2024-11-25 19:38:17 +01:00
parent f41db67663
commit 75a22b7b52
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace Core\View\Render;
use Core\View\Render;
class JsonRender extends Render
{
/**
* @inheritDoc
* @throws \Exception
*/
public function render(): void
{
header('Content-Type: application/json; charset=utf-8');
echo json_encode($this->data);
}
}