Source of file UseJson.php
Size: 0,509 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/Controller/Helper/UseJson.php
123456789101112131415161718192021222324252627282930 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\Controller\Helper; use Bluz\Application\Application; use Bluz\Controller\Controller; use Bluz\Proxy\Response; /** * Switch to JSON content * * @return void */ return function () { /** * @var Controller $this */ Application::getInstance()->useLayout(false); Response::setType('JSON'); }; |