Last active
August 29, 2015 14:13
-
-
Save doug48/281166a4b56ec624e40a to your computer and use it in GitHub Desktop.
fire php use in helper file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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