Elgg  Version 2.3
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 15 of file QueryCounter.php.

Constructor & Destructor Documentation

Elgg\Database\QueryCounter::__construct ( \Elgg\Database  $db)

Constructor.

Parameters
\Elgg\Database$dbElgg's database

Definition at line 32 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 42 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 70 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 55 of file QueryCounter.php.

Member Data Documentation

Elgg\Database\QueryCounter::$db
protected

Definition at line 25 of file QueryCounter.php.

Elgg\Database\QueryCounter::$initial
protected

Definition at line 20 of file QueryCounter.php.


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