equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Db |
16 * @package Zend_Db |
17 * @subpackage Profiler |
17 * @subpackage Profiler |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Profiler.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Profiler.php 25127 2012-11-16 15:17:42Z rob $ |
21 */ |
21 */ |
22 |
22 |
23 |
23 |
24 /** |
24 /** |
25 * @category Zend |
25 * @category Zend |
26 * @package Zend_Db |
26 * @package Zend_Db |
27 * @subpackage Profiler |
27 * @subpackage Profiler |
28 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
28 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
29 * @license http://framework.zend.com/license/new-bsd New BSD License |
29 * @license http://framework.zend.com/license/new-bsd New BSD License |
30 */ |
30 */ |
31 class Zend_Db_Profiler |
31 class Zend_Db_Profiler |
32 { |
32 { |
33 |
33 |
223 |
223 |
224 return $this; |
224 return $this; |
225 } |
225 } |
226 |
226 |
227 /** |
227 /** |
228 * @param integer $queryId |
228 * Clone a profiler query |
|
229 * |
|
230 * @param Zend_Db_Profiler_Query $query |
229 * @return integer or null |
231 * @return integer or null |
230 */ |
232 */ |
231 public function queryClone(Zend_Db_Profiler_Query $query) |
233 public function queryClone(Zend_Db_Profiler_Query $query) |
232 { |
234 { |
233 $this->_queryProfiles[] = clone $query; |
235 $this->_queryProfiles[] = clone $query; |
285 |
287 |
286 return key($this->_queryProfiles); |
288 return key($this->_queryProfiles); |
287 } |
289 } |
288 |
290 |
289 /** |
291 /** |
290 * Ends a query. Pass it the handle that was returned by queryStart(). |
292 * Ends a query. Pass it the handle that was returned by queryStart(). |
291 * This will mark the query as ended and save the time. |
293 * This will mark the query as ended and save the time. |
292 * |
294 * |
293 * @param integer $queryId |
295 * @param integer $queryId |
294 * @throws Zend_Db_Profiler_Exception |
296 * @throws Zend_Db_Profiler_Exception |
295 * @return void |
297 * @return string Inform that a query is stored or ignored. |
296 */ |
298 */ |
297 public function queryEnd($queryId) |
299 public function queryEnd($queryId) |
298 { |
300 { |
299 // Don't do anything if the Zend_Db_Profiler is not enabled. |
301 // Don't do anything if the Zend_Db_Profiler is not enabled. |
300 if (!$this->_enabled) { |
302 if (!$this->_enabled) { |