public function __construct($config = array())
{
$this->CI =& get_instance();
$this->CI->load->language('profiler');
// If the config file has a query_toggle_count,
// use it, but remove it from the config array.
if (isset($config['query_toggle_count'])) {
$this->_query_toggle_count = (int) $config['query_toggle_count'];
unset($config['query_toggle_count']);
}
// default all sections to display
foreach ($this->_available_sections as $section) {
if (!isset($config[$section])) {
$this->_compile_[$section] = TRUE;
}
}
// Make sure the Console is loaded.
if (!class_exists('Console')) {
$this->CI->load->library('Console');
}
$this->set_sections($config);
// Strange hack to get access to the current
// vars in the CI_Loader class.
$this->_ci_cached_vars = $this->CI->load->_ci_cached_vars;
}