category Zend
package Zend_Db
subpackage Profiler
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Clone handler for the query object.

__clone() : 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).

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

Parameters

$query

string

$queryType

integer

bindParam()

bindParam(string $param, mixed $variable) : void

Parameters

$param

string

$variable

mixed

bindParams()

bindParams(array $params) : void

Parameters

$params

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

end() : void

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

getElapsedSecs() : float | false

If the query has not yet ended, false is returned.

Returns

floatfalse

Get the original SQL text of the query.

getQuery() : string

Returns

string

getQueryParams()

getQueryParams() : array

Returns

array

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

getQueryType() : integer

Returns

integer

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

getStartedMicrotime() : boolean | float

Returns

booleanfloat

Returns true if and only if the query has ended.

hasEnded() : boolean

Returns

boolean

Starts the elapsed time click ticking.

start() : void

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

 Properties

 

$_boundParams

$_boundParams : array

Default

array()
 

Unix timestamp with microseconds when self::queryEnd() was called.

$_endedMicrotime : integer

Default

null
 

SQL query string or user comment, set by $query argument in constructor.

$_query : string

Default

''
 

One of the Zend_Db_Profiler constants for query type, set by $queryType argument in constructor.

$_queryType : integer

Default

0
 

Unix timestamp with microseconds when instantiated.

$_startedMicrotime : float

Default

null