Skip to content

Instantly share code, notes, and snippets.

@olivopablo
Created September 19, 2012 12:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save olivopablo/3749507 to your computer and use it in GitHub Desktop.
Save olivopablo/3749507 to your computer and use it in GitHub Desktop.
codeigniter firephp-helper
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
// ------------------------------------------------------------------------
/**
* Firephp helper
*
*/
require_once APPPATH . 'third_party/firephp/lib/firephpcore/firephp.class.php'; // path to your firephp libs
/*
* fire_output
*/
function fire_print($type, $msg, $optional_label = '')
{
//output only when on development environtment. set on index.php
if (ENVIRONMENT == 'development')
{
$firephp = FirePHP::getInstance(true);
if($type=="json"){
$type = 'info';
$msg = json_decode($msg);
}
$firephp->$type($msg, $optional_label);
}
}
function fire_trace($trace_label = '')
{
//output only when on development environtment. set on index.php
if (ENVIRONMENT === 'development')
{
$firephp = FirePHP::getInstance(true);
$firephp->trace($trace_label);
}
}
/* End of file fire_debug_helper.php */
/* Location: ./application/helpers/seo_helper.php */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment