Db/Profiler/Query.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Db  
Subpackage
Profiler  
Version
$Id$  

\Zend_Db_Profiler_Query

Package: Zend_Db\Profiler
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedarray $_boundParams = array()
Default valuearray()Details
Type
array
>VPropertyprotectedinteger $_endedMicrotime = null
Unix timestamp with microseconds when self::queryEnd() was called.
Default valuenullDetails
Type
integer
>VPropertyprotectedstring $_query = ''
SQL query string or user comment, set by $query argument in constructor.
Default value''Details
Type
string
>VPropertyprotectedinteger $_queryType = 0
One of the Zend_Db_Profiler constants for query type, set by $queryType argument in constructor.
Default value0Details
Type
integer
>VPropertyprotectedfloat $_startedMicrotime = null
Unix timestamp with microseconds when instantiated.
Default valuenullDetails
Type
float

Methods

methodpublic__clone() : void

Clone handler for the query object.

methodpublic__construct(string $query, integer $queryType) : void

Class constructor. A query is about to be started, save the query text ($query) and its type (one of the Zend_Db_Profiler::* constants).

Parameters
NameTypeDescription
$querystring
$queryTypeinteger
methodpublicbindParam(string $param, mixed $variable) : void

Parameters
NameTypeDescription
$paramstring
$variablemixed
methodpublicbindParams( $params) : void

Parameters
NameTypeDescription
$params
methodpublicend() : void

Ends the query and records the time so that the elapsed time can be determined later.

methodpublicgetElapsedSecs() : float | false

Get the elapsed time (in seconds) that the query ran.

If the query has not yet ended, false is returned.
Returns
TypeDescription
float | false
methodpublicgetQuery() : string

Get the original SQL text of the query.

Returns
TypeDescription
string
methodpublicgetQueryParams() : array

Returns
TypeDescription
array
methodpublicgetQueryType() : integer

Get the type of this query (one of the Zend_Db_Profiler::* constants)

Returns
TypeDescription
integer
methodpublicgetStartedMicrotime() : bool | float

Get the time (in seconds) when the profiler started running.

Returns
TypeDescription
bool | float
methodpublichasEnded() : boolean

Returns true if and only if the query has ended.

Returns
TypeDescription
boolean
methodpublicstart() : void

Starts the elapsed time click ticking.

This can be called subsequent to object creation, to restart the clock. For instance, this is useful right before executing a prepared query.
Documentation was generated by phpDocumentor 2.2.0 .