Exemplo n.º 1
0
 static function init()
 {
     $settings = CConf::get('profiler');
     if (isset($settings['enabled']) && $settings['enabled'] == 'yes') {
         self::$enabled = true;
     }
     if (isset($settings['display_include']) && $settings['display_include'] == 'yes') {
         self::$display_include = true;
     }
     if (isset($settings['display_file_io']) && $settings['display_file_io'] == 'yes') {
         self::$display_file_io = true;
     }
     if (isset($settings['display_queries']) && $settings['display_queries'] == 'yes') {
         self::$display_queries = true;
     }
     if (isset($settings['display_cache']) && $settings['display_cache'] == 'yes') {
         self::$display_cache = true;
     }
     if (isset($settings['display_block_tags']) && $settings['display_block_tags'] == 'yes') {
         self::$display_block_tags = true;
     }
     if (isset($settings['write_csv']) && $settings['write_csv'] == 'yes') {
         self::$write_csv = true;
     }
     self::$profiler = new CProfilerStorage();
     self::$profiler->timer_total->start();
 }