DebugStack
in package
implements
SQLLogger
Includes executed SQLs in a Debug Stack.
Tags
Interfaces, Classes and Traits
- SQLLogger
- Interface for SQL loggers.
Table of Contents
- $currentQuery : int
- $enabled : bool
- If Debug Stack is enabled (log queries) or not.
- $queries : array<string|int, mixed>
- Executed SQL queries.
- $start : float|null
- startQuery() : void
- Logs a SQL statement somewhere.
- stopQuery() : void
- Marks the last started query as stopped. This can be used for timing of queries.
Properties
$currentQuery
public
int
$currentQuery
= 0
$enabled
If Debug Stack is enabled (log queries) or not.
public
bool
$enabled
= true
$queries
Executed SQL queries.
public
array<string|int, mixed>
$queries
= array()
$start
public
float|null
$start
= null
Methods
startQuery()
Logs a SQL statement somewhere.
public
startQuery(mixed $sql[, array<string|int, mixed> $params = null ][, array<string|int, mixed> $types = null ]) : void
Parameters
- $sql : mixed
-
The SQL to be executed.
- $params : array<string|int, mixed> = null
-
The SQL parameters.
- $types : array<string|int, mixed> = null
-
The SQL parameter types.
Return values
void —stopQuery()
Marks the last started query as stopped. This can be used for timing of queries.
public
stopQuery() : void