]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
new sql profiler
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 17 Aug 2014 05:36:05 +0000 (08:36 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 17 Aug 2014 05:36:05 +0000 (08:36 +0300)
ipf/orm/connection/profiler.php [deleted file]

diff --git a/ipf/orm/connection/profiler.php b/ipf/orm/connection/profiler.php
deleted file mode 100644 (file)
index 4284fcb..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-class IPF_ORM_Connection_Profiler
-{
-    private $listeners  = array('query',
-                                'prepare',
-                                'commit',
-                                'rollback',
-                                'connect',
-                                'begintransaction',
-                                'exec',
-                                'execute');
-
-    public $events = array();
-
-    public function __call($m, $a)
-    {
-        if (!($a[0] instanceof IPF_ORM_Event))
-            return;
-
-        if (substr($m, 0, 3) === 'pre') {
-            // pre-event listener found
-            $a[0]->start();
-
-            if ( ! in_array($a[0], $this->events, true)) {
-                $this->events[] = $a[0];
-            }
-        } else {
-            // after-event listener found
-            $a[0]->end();
-        }
-    }
-}
-