for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Class JsonResponse | JsonResponse.php
* @package Faulancer\Http
* @author Florian Knapp <[email protected]>
*/
namespace Faulancer\Http;
* Class JsonResponse
class JsonResponse extends Response
{
protected $content = [];
* @param array $content
* @return self
public function setContent($content = [])
$this->setResponseHeader(['Content-Type' => 'application/json']);
$this->content = json_encode($content);
return $this;
}