DbalLogger
in package
implements
SQLLogger
Tags
Interfaces, Classes, Traits and Enums
- SQLLogger
- Interface for SQL loggers.
Table of Contents
- BINARY_DATA_VALUE = '(binary value)'
- MAX_STRING_LENGTH = 32
- $logger : mixed
- $stopwatch : mixed
- __construct() : mixed
- startQuery() : void
- Logs a SQL statement somewhere.
- stopQuery() : void
- Marks the last started query as stopped. This can be used for timing of queries.
- log() : mixed
- Logs a message.
- normalizeParams() : array<string|int, mixed>
Constants
BINARY_DATA_VALUE
public
mixed
BINARY_DATA_VALUE
= '(binary value)'
MAX_STRING_LENGTH
public
mixed
MAX_STRING_LENGTH
= 32
Properties
$logger
protected
mixed
$logger
$stopwatch
protected
mixed
$stopwatch
Methods
__construct()
public
__construct([LoggerInterface $logger = null ][, Stopwatch $stopwatch = null ]) : mixed
Parameters
- $logger : LoggerInterface = null
- $stopwatch : Stopwatch = null
Return values
mixed —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
-
SQL statement
- $params : array<string|int, mixed> = null
-
Statement parameters
- $types : array<string|int, mixed> = null
-
Parameter types
Return values
void —stopQuery()
Marks the last started query as stopped. This can be used for timing of queries.
public
stopQuery() : void
Return values
void —log()
Logs a message.
protected
log(string $message, array<string|int, mixed> $params) : mixed
Parameters
- $message : string
-
A message to log
- $params : array<string|int, mixed>
-
The context
Return values
mixed —normalizeParams()
private
normalizeParams(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>