Elgg  Version 1.9
Public Member Functions | Protected Attributes | List of all members
Elgg_Database_QueryCounter Class Reference

Public Member Functions

 __construct (Elgg_Database $db)
 Constructor. More...
 
 getDelta ()
 Get the number of queries performed since the object was constructed. More...
 
 setDeltaHeader ($key= 'Default')
 Create header X-ElggQueryDelta-* with the delta. More...
 
 getDeltaScript ($key= 'Default')
 Get SCRIPT element which sends the delta to console.log. More...
 

Protected Attributes

 $initial
 
 $db
 

Detailed Description

Definition at line 14 of file QueryCounter.php.

Constructor & Destructor Documentation

Elgg_Database_QueryCounter::__construct ( Elgg_Database  $db)

Constructor.

Parameters
Elgg_Database$dbElgg's database

Definition at line 31 of file QueryCounter.php.

Member Function Documentation

Elgg_Database_QueryCounter::getDelta ( )

Get the number of queries performed since the object was constructed.

Returns
int # of queries

Definition at line 41 of file QueryCounter.php.

Elgg_Database_QueryCounter::getDeltaScript (   $key = 'Default')

Get SCRIPT element which sends the delta to console.log.

See also
getDelta()
Parameters
string$keyKey to display in console log
Returns
string markup of SCRIPT element

Definition at line 69 of file QueryCounter.php.

Elgg_Database_QueryCounter::setDeltaHeader (   $key = 'Default')

Create header X-ElggQueryDelta-* with the delta.

See also
getDelta()
Parameters
string$keyKey to add to HTTP header name
Returns
void

Definition at line 54 of file QueryCounter.php.

Member Data Documentation

Elgg_Database_QueryCounter::$db
protected

Definition at line 24 of file QueryCounter.php.

Elgg_Database_QueryCounter::$initial
protected

Definition at line 19 of file QueryCounter.php.


The documentation for this class was generated from the following file: