API::header PHP Method

header() protected method

Show API header in debug, it add body and some libs (essentialy to colorise markdown) otherwise, it change only Content-Type of the page
protected header ( $html = false, $title = "" )
$html (default false)
$title (default '')
    protected function header($html = false, $title = "")
    {
        // Send UTF8 Headers
        $content_type = "application/json";
        if ($html) {
            $content_type = "text/html";
        }
        header("Content-Type: {$content_type}; charset=UTF-8");
        // Send extra expires header
        Html::header_nocache();
        if ($html) {
            if (empty($title)) {
                $title = $this->getTypeName();
            }
            Html::includeHeader($title);
            // Body with configured stuff
            echo "<body>";
            echo "<div id='page'>";
        }
    }