コード例 #1
0
ファイル: BF_output_ajax.php プロジェクト: laiello/phpbf
 public function send($message = '')
 {
     if (!$this->content_type) {
         $this->content_type = 'text/plain';
     }
     BF_output::send_content_type($this->content_type);
     return print $message;
 }
コード例 #2
0
ファイル: BF_output_plain.php プロジェクト: laiello/phpbf
 /**
  * Send content to output
  * @param	string	$content : Content to send
  * @return	bool
  */
 public function send($content)
 {
     BF_output::send_content_type($this->content_type);
     print $content;
 }
コード例 #3
0
ファイル: BF_output_template.php プロジェクト: laiello/phpbf
 /**
  * Display/fetch template template
  * @param	bool	$display [optional default true] : Set to false to return content instead of displaying it
  * @return	mixed	Template ouput, unless $display is true (returns void)
  */
 public function disp($display = true)
 {
     // Display template
     if (!isset($this->data['template']) || !$this->data['template']) {
         throw new exception('No template loaded');
     }
     if ($display) {
         BF_output::send_content_type($this->content_type);
         return $this->display($this->data['template'] . ".tpl", $this->data['cache_version'], BF::gc('locale_enabled') ? BF::gl()->locale : null);
     } else {
         return $this->fetch($this->data['template'] . ".tpl", $this->data['cache_version'], BF::gc('locale_enabled') ? BF::gl()->locale : null);
     }
 }