Changeset 2687

Show
Ignore:
Timestamp:
05/22/2008 06:48:44 PM (5 months ago)
Author:
PugFish
Message:

Added all built in profiles to the profiler.run event rather than calling them directly

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Profiler.php

    r2686 r2687  
    2323        public function __construct() 
    2424        { 
     25                // Add all built in profiles to event 
     26                Event::add('profiler.run', array($this, 'benchmarks')); 
     27                Event::add('profiler.run', array($this, 'database')); 
     28                Event::add('profiler.run', array($this, 'session')); 
     29                Event::add('profiler.run', array($this, 'post')); 
     30                Event::add('profiler.run', array($this, 'cookies')); 
     31 
    2532                // Add profiler to page output automatically 
    2633                Event::add('system.display', array($this, 'render')); 
     
    7784 
    7885                Event::run('profiler.run'); 
    79  
    80                 $this->benchmarks(); 
    81                 $this->database(); 
    82                 $this->session(); 
    83                 $this->post(); 
    84                 $this->cookies(); 
    8586 
    8687                $styles = '';