Example #1
0
 public function send($message = '')
 {
     if (!$this->content_type) {
         $this->content_type = 'text/plain';
     }
     BF_output::send_content_type($this->content_type);
     return print $message;
 }
Example #2
0
 /**
  * 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;
 }
Example #3
0
 /**
  * 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);
     }
 }