* @copyright 2014 Christian Weiske * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3 * @link http://cweiske.de/bdrem.htm */ namespace bdrem; /** * HTML page renderer. Renders a full HTML page. * * @category Tools * @package Bdrem * @author Christian Weiske * @copyright 2014 Christian Weiske * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3 * @version Release: @package_version@ * @link http://cweiske.de/bdrem.htm */ class Renderer_Html extends Renderer { /** * HTTP content type * @var string */ protected $httpContentType = 'application/xhtml+xml; charset=utf-8'; /** * Send out HTTP headers when nothing shall be outputted. * * @return void */ public function handleStopOnEmpty() { header('HTTP/1.0 204 No Content'); } /** * Generate a HTML page with the given events. * * @param array $arEvents Events to display on the HTML page * * @return string HTML code * * @see Renderer_HtmlTable */ public function render($arEvents) { $links = ''; if (isset($_SERVER['HTTP_HOST'])) { $links = ' ' . "\n"; $links .= ' ' . "\n"; } $tr = new Renderer_HtmlTable(); $table = $tr->render($arEvents); $s = << bdrem $links $table HTM; return $s; } } ?>