Refactor classes into Http structure
This commit is contained in:
parent
83bc1a1661
commit
591e0c194d
9 changed files with 25 additions and 25 deletions
18
src/Http/View/Engine/JsonEngine.php
Normal file
18
src/Http/View/Engine/JsonEngine.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Core\Http\View\Engine;
|
||||
|
||||
use Core\Http\View\Engine;
|
||||
|
||||
class JsonEngine extends Render
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function render(): void
|
||||
{
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($this->data);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue