2011-05-25 12:04:10 +03:00
|
|
|
<?php defined('SYSPATH') or die('No direct script access.');
|
|
|
|
|
|
|
|
// Load FirePHP if it enabled in config
|
2013-07-21 23:31:48 +03:00
|
|
|
if (Kohana::$config->load('debug_toolbar.firephp_enabled') === TRUE && ! class_exists('FirePHP'))
|
2012-11-10 13:07:05 +02:00
|
|
|
{
|
|
|
|
$file = 'firephp/packages/core/lib/FirePHPCore/FirePHP.class';
|
2011-08-03 08:00:48 +03:00
|
|
|
$firePHP = Kohana::find_file('vendor', $file);
|
2012-11-10 13:07:05 +02:00
|
|
|
|
|
|
|
if ( ! $firePHP) {
|
|
|
|
throw new Kohana_Exception('The FirePHP :file could not be found', array(':file' => $file));
|
|
|
|
}
|
|
|
|
|
2011-08-03 08:00:48 +03:00
|
|
|
require_once $firePHP;
|
|
|
|
}
|
2011-05-25 12:04:10 +03:00
|
|
|
// Render Debug Toolbar on the end of application execution
|
2011-08-29 22:44:14 +03:00
|
|
|
if (Kohana::$config->load('debug_toolbar.auto_render') === TRUE)
|
2012-11-10 13:07:05 +02:00
|
|
|
{
|
2013-07-21 22:50:35 +03:00
|
|
|
register_shutdown_function('Debugtoolbar::render', TRUE);
|
2012-11-10 13:07:05 +02:00
|
|
|
}
|