Snowair\Debugbar\PhalconDebugbar::isJsonRequest PHP Method

isJsonRequest() protected method

protected isJsonRequest ( ) : boolean
return boolean
    protected function isJsonRequest()
    {
        // If XmlHttpRequest, return true
        if ($this->di['request']->isAjax()) {
            return true;
        }
        // Check if the request wants Json
        $acceptable = $this->di['request']->getAcceptableContent();
        return isset($acceptable[0]) && $acceptable[0]['accept'] == 'application/json';
    }