Created
September 19, 2012 12:59
-
-
Save olivopablo/3749507 to your computer and use it in GitHub Desktop.
codeigniter firephp-helper
This file contains hidden or 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 | |
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