Changeset 4607 for trunk/core/debug/doctrineprofiler.core.php
- Timestamp:
- 08/29/10 18:30:31 (21 months ago)
- File:
-
- 1 edited
-
trunk/core/debug/doctrineprofiler.core.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/debug/doctrineprofiler.core.php
r4599 r4607 47 47 class Clansuite_Doctrine_Profiler 48 48 { 49 public function __construct()50 {51 $this->connection = Doctrine_Manager::connection();52 }53 54 49 /** 55 50 * Returns Doctrine's connection profiler … … 57 52 * @return Doctrine_Connection_Profiler 58 53 */ 59 public function getProfiler()54 public static function getProfiler() 60 55 { 61 return $this->connection->getListener();56 return Doctrine_Manager::connection()->getListener(); 62 57 } 63 58 … … 65 60 * Attached the Doctrine Profiler as Listener to the connection 66 61 */ 67 public function attachProfiler()62 public static function attachProfiler() 68 63 { 69 64 # instantiate Profiler and attach to doctrine connection 70 $this->connection->setListener(new Doctrine_Connection_Profiler);71 72 register_shutdown_function( array($this,'shutdown'));65 Doctrine_Manager::connection()->setListener(new Doctrine_Connection_Profiler); 66 67 register_shutdown_function('Clansuite_Doctrine_Profiler::shutdown'); 73 68 } 74 69 … … 79 74 * @return Direct HTML Output 80 75 */ 81 public function displayProfilingHTML()76 public static function displayProfilingHTML() 82 77 { 83 78 /** … … 85 80 */ 86 81 $query_counter = 0; 82 87 83 /** 88 84 * @var int time in seconds, counting the elapsed time for all queries … … 90 86 $time = 0; 91 87 92 93 echo'<!-- Disable Debug Mode to remove this!-->88 $html = ''; 89 $html .= '<!-- Disable Debug Mode to remove this!--> 94 90 <style type="text/css"> 95 91 /*<