for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\ViewEngine;
use Core\View\ViewEngineInterface;
class JsonView implements ViewEngineInterface
{
private $data = null;
public function __construct($settings = [])
// dummy
}
public function set($key, $value)
public function getVariables()
return [];
public function file($data)
$this->data = $data;
public function getFile()
return $this->data;
public function render()
header('Content-Type: application/json');
return json_encode($this->data);