1 | <?php |
||
23 | class DbalLogger extends DebugStack |
||
24 | { |
||
25 | const MAX_STRING_LENGTH = 32; |
||
26 | const BINARY_DATA_VALUE = '(binary value)'; |
||
27 | |||
28 | protected $logger; |
||
29 | protected $stopwatch; |
||
30 | |||
31 | /** |
||
32 | * Constructor. |
||
33 | * |
||
34 | * @param LoggerInterface $logger A LoggerInterface instance |
||
35 | * @param Stopwatch $stopwatch A Stopwatch instance |
||
36 | */ |
||
37 | public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function startQuery($sql, array $params = null, array $types = null) |
||
62 | |||
63 | /** |
||
64 | * @param array $params |
||
65 | * @return array |
||
66 | */ |
||
67 | protected function fixParams(array $params) |
||
75 | |||
76 | /** |
||
77 | * @param mixed $param |
||
78 | * @return mixed |
||
79 | */ |
||
80 | protected function fixParam($param) |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | public function stopQuery() |
||
116 | |||
117 | /** |
||
118 | * Logs a message. |
||
119 | * |
||
120 | * @param string $message A message to log |
||
121 | * @param array $params The context |
||
122 | */ |
||
123 | protected function log($message, array $params) |
||
127 | } |
||
128 |