Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Db_Profiler_Query Class Reference

Public Member Functions

 __construct ($query, $queryType)
 Class constructor.
 
 __clone ()
 Clone handler for the query object.
 
 start ()
 Starts the elapsed time click ticking.
 
 end ()
 Ends the query and records the time so that the elapsed time can be determined later.
 
 hasEnded ()
 Returns true if and only if the query has ended.
 
 getQuery ()
 Get the original SQL text of the query.
 
 getQueryType ()
 Get the type of this query (one of the Zend_Db_Profiler::* constants)
 
 bindParam ($param, $variable)
 
 bindParams (array $params)
 
 getQueryParams ()
 
 getElapsedSecs ()
 Get the elapsed time (in seconds) that the query ran.
 
 getStartedMicrotime ()
 Get the time (in seconds) when the profiler started running.
 

Protected Attributes

 $_query = ''
 
 $_queryType = 0
 
 $_startedMicrotime = null
 
 $_endedMicrotime = null
 
 $_boundParams = array()
 

Constructor & Destructor Documentation

__construct (   $query,
  $queryType 
)

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
string$query
integer$queryType
Returns
void

Member Function Documentation

__clone ( )

Clone handler for the query object.

Returns
void
bindParam (   $param,
  $variable 
)
Parameters
string$param
mixed$variable
Returns
void
bindParams ( array  $params)
Parameters
array$param
Returns
void
end ( )

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

Returns
void
getElapsedSecs ( )

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

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

Returns
float|false
getQuery ( )

Get the original SQL text of the query.

Returns
string
getQueryParams ( )
Returns
array
getQueryType ( )

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

Returns
integer
getStartedMicrotime ( )

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

Returns
bool|float
hasEnded ( )

Returns true if and only if the query has ended.

Returns
boolean
start ( )

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.

Returns
void

Member Data Documentation

$_boundParams = array()
protected
$_endedMicrotime = null
protected
$_query = ''
protected
$_queryType = 0
protected
$_startedMicrotime = null
protected