1
0
Fork 0
mirror of https://github.com/Oreolek/debug-toolbar.git synced 2024-04-24 05:11:17 +03:00
debug-toolbar/init.php

19 lines
650 B
PHP
Raw Permalink Normal View History

<?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;
}
// 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
{
register_shutdown_function('Debugtoolbar::render', TRUE);
2012-11-10 13:07:05 +02:00
}