00001 <?php
00002 require_once dirname(__FILE__) . '/contentviewbase.cls.php';
00003
00004
00005
00006
00007
00008
00009
00010 class XmlViewBase extends ContentViewBase {
00011
00012
00013
00014
00015
00016
00017 protected function render_preprocess($policy) {
00018 $this->page_data->in_history = false;
00019 $this->page_data->page_template = 'emptypage';
00020 }
00021
00022
00023
00024
00025
00026
00027
00028
00029 protected function after_render(&$rendered_content, $policy) {
00030 $xml_header = '<?xml version="1.0" encoding="' . GyroLocale::get_charset() . '"?>';
00031 $rendered_content = $xml_header . $rendered_content;
00032 parent::after_render($rendered_content, $policy);
00033 if (!Common::flag_is_set($policy, self::CONTENT_ONLY)) {
00034 header('Content-Type: application/xml; charset=' . GyroLocale::get_charset(), true);
00035 }
00036 }
00037 }