1 | <?php |
||
31 | class Profiler extends ObjectAbstract implements ProfilerInterface |
||
32 | { |
||
33 | use DriverAwareTrait; |
||
34 | |||
35 | /** |
||
36 | * Current executed SQL |
||
37 | * |
||
38 | * @var string |
||
39 | * @access protected |
||
40 | */ |
||
41 | protected $sql = ''; |
||
42 | |||
43 | /** |
||
44 | * Parameters cache |
||
45 | * |
||
46 | * @var array |
||
47 | * @access protected |
||
48 | */ |
||
49 | protected $params = []; |
||
50 | |||
51 | /** |
||
52 | * Execution time |
||
53 | * |
||
54 | * @var float |
||
55 | * @access protected |
||
56 | */ |
||
57 | protected $execution_time = 0.0; |
||
58 | |||
59 | /** |
||
60 | * {@inheritDoc} |
||
61 | */ |
||
62 | public function setSql(/*# string */ $sql) |
||
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | public function setParameters(array $parameters) |
||
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | public function getSql()/*# : string */ |
||
92 | |||
93 | /** |
||
94 | * {@inheritDoc} |
||
95 | */ |
||
96 | public function startWatch() |
||
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | public function stopWatch() |
||
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | public function getExecutionTime()/*# : float */ |
||
118 | |||
119 | /** |
||
120 | * Replace params in the SQL |
||
121 | * |
||
122 | * @return string |
||
123 | * @access protected |
||
124 | */ |
||
125 | protected function replaceParamInSql()/*# : string */ |
||
143 | } |
||
144 |