Skip to content

Instantly share code, notes, and snippets.

@doug48
Last active August 29, 2015 14:13
Show Gist options
  • Save doug48/281166a4b56ec624e40a to your computer and use it in GitHub Desktop.
Save doug48/281166a4b56ec624e40a to your computer and use it in GitHub Desktop.
fire php use in helper file
<?php
public function sendToFirebug($content) {
$writer = new Zend_Log_Writer_Firebug();
$logger = new Zend_Log($writer);
$request = new Zend_Controller_Request_Http();
$response = new Zend_Controller_Response_Http();
$channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
$channel->setRequest($request);
$channel->setResponse($response);
// Start output buffering
ob_start();
// Now you can make calls to the logger
$logger->log($content, Zend_Log::INFO);
// Flush log data to browser
$channel->flush();
$response->sendHeaders();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment