Class DibiProfiler


dibi basic logger & profiler (experimental).

Profiler options:

  • 'explain' - explain SELECT queries?
  • 'filter' - which queries to log?

DibiObject
   |
   --DibiProfiler

Implements interfaces:

IDibiProfiler, IDebugPanel
Copyright: Copyright (c) 2005, 2010 David Grudl
Located: in /libs/DibiProfiler.php (line 25)
Constructor Summary
public
__construct ($config)
Method Summary
void
after (int $ticket, [DibiResult $res = NULL])
After event notification.
int
before (DibiConnection $connection, int $event, [string $sql = NULL])
Before event notification.
void
After exception notification.
string
getId ()
Returns panel ID.
mixed
Returns HTML code for custom panel.
mixed
getTab ()
Returns HTML code for custom tab.
DibiProfiler
setFile (string $file)
DibiProfiler
setFilter (int $filter)
Methods Inherited From DibiObject
DibiObject::extensionMethod(), DibiObject::getClass(), DibiObject::getReflection(), DibiObject::__call(), DibiObject::__callStatic(), DibiObject::__get(), DibiObject::__isset(), DibiObject::__set(), DibiObject::__unset()
Variable Summary
bool $explainQuery TRUE

line 40

explain queries?
static array $fireTable array(array('Time', 'SQL Statement', 'Rows', 'Connection'))

line 49

static mixed $maxLength 1000

line 31

maximum SQL length
static mixed $maxQueries 30

line 28

maximum number of rows
static array $tickets array()

line 46

bool $useFirebug

line 37

log to firebug?

Constructor Details

line 53

__construct

public __construct ($config)

Input
$config
Method Details

line 124

after

public void after (int $ticket, [DibiResult $res = NULL])

After event notification.

Implementation of:

Input
int $ticket
DibiResult $res
Output
void  

line 107

before

public int before (DibiConnection $connection, int $event, [string $sql = NULL])

Before event notification.

Implementation of:

Input
DibiConnection $connection
int $event event name
string $sql sql
Output
int  

line 203

exception

public void exception (DibiDriverException $exception)

After exception notification.

Implementation of:

Input
DibiDriverException $exception
Output
void  

line 304

getId

public string getId ()

Returns panel ID.

Output
string  

line 260

getPanel

public mixed getPanel ()

Returns HTML code for custom panel.

Output
mixed  

line 248

getTab

public mixed getTab ()

Returns HTML code for custom tab.

Output
mixed  

line 80

setFile

public DibiProfiler setFile (string $file)

Input
string $file filename
Output
DibiProfiler provides a fluent interface

line 92

setFilter

public DibiProfiler setFilter (int $filter)

Input
int $filter
Output
DibiProfiler provides a fluent interface