Пример #1
0
 public function render($file, $send_content_type)
 {
     if ($send_content_type) {
         APF::get_instance()->get_response()->set_content_type($this->get_content_type(), $this->get_charset());
     }
     parent::render($file);
 }
Пример #2
0
 /**
  * 渲染页面文件phtml,也就是执行phtml。
  * 即,页面phtml是作为render方法的一部分来影响最终显示结果的。
  * @param string $file 文件路径
  * @param boolen $send_content_type 内容类型开关
  * @see APF_Component::render()
  */
 public function render($file, $send_content_type)
 {
     if ($send_content_type) {
         // 设置返回内容类型和编码
         APF::get_instance()->get_response()->set_content_type($this->get_content_type(), $this->get_charset());
     }
     // 执行渲染操作
     parent::render($file);
 }
Пример #3
0
 /**
  * 渲染页面文件phtml,也就是执行phtml。
  * 即,页面phtml是作为render方法的一部分来影响最终显示结果的。
  * @param string $file 文件路径
  * @param boolen $send_content_type 内容类型开关
  * @see APF_Component::render()
  */
 public function render($file)
 {
     $args = func_get_args();
     $send_content_type = isset($args[1]) ? $args[1] : false;
     if ($send_content_type) {
         // 设置返回内容类型和编码
         APF::get_instance()->get_response()->set_content_type($this->get_content_type(), $this->get_charset());
     }
     // 执行渲染操作
     parent::render($file);
 }