src/View/Output/Chunks.php
protected function isOutputHtml()
    {
        static $result;

        if ($result !== null) {
            return $result;
        }

        if ($this->pool->config->getSetting(Fallback::SETTING_DETECT_AJAX) === Fallback::VALUE_FALSE) {
            // We ignore the heades and send everything.
            $result = true;
        }

        // When we have dispatched a PDF or Json, the browser will not be
        // able to render the HTML output correctly.
        foreach (headers_list() as $header) {
            $header = strtolower($header);
            if (strpos($header, 'content-type') !== false &&
                strpos($header, 'html') === false
            ) {
                // We do have none html content type.
                $result = false;
            }
        }

        // Found nothing, must be HTML.
        return $result = true;
    }
protected function isOutputHtml()
    {
        static $result;

        if ($result !== null) {
            return $result;
        }

        if ($this->pool->config->getSetting(Fallback::SETTING_DETECT_AJAX) === Fallback::VALUE_FALSE) {
            // We ignore the heades and send everything.
            $result = true;
        }

        // When we have dispatched a PDF or Json, the browser will not be
        // able to render the HTML output correctly.
        foreach (headers_list() as $header) {
            $header = strtolower($header);
            if (strpos($header, 'content-type') !== false &&
                strpos($header, 'html') === false
            ) {
                // We do have none html content type.
                $result = false;
            }
        }

        // Found nothing, must be HTML.
        return $result = true;
    }
protected function isOutputHtml ( ) { static $ result ; if ( $ result !== null ) { return $ result ; } if ( $ this -> pool -> config -> getSetting ( Fallback :: SETTING_DETECT_AJAX ) === Fallback :: VALUE_FALSE ) { // We ignore the heades and send everything. $ result = true ; } // When we have dispatched a PDF or Json, the browser will not be // able to render the HTML output correctly. foreach ( headers_list ( ) as $ header ) { $ header = strtolower ( $ header ) ; if ( strpos ( $ header , 'content-type' ) !== false && strpos ( $ header , 'html' ) === false ) { // We do have none html content type. $ result = false ; } } // Found nothing, must be HTML. return $ result = true ; }
Is the output so far HTML?

This one gets called during the shutdown phase of PHP. There is a high
chance, that the header was already set.

@return bool
Well? Is it?
Is the output so far HTML?