SQLLogger.php 635 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Doctrine\DBAL\Logging;
  3. /**
  4. * Interface for SQL loggers.
  5. */
  6. interface SQLLogger
  7. {
  8. /**
  9. * Logs a SQL statement somewhere.
  10. *
  11. * @param string $sql The SQL to be executed.
  12. * @param mixed[]|null $params The SQL parameters.
  13. * @param int[]|string[]|null $types The SQL parameter types.
  14. *
  15. * @return void
  16. */
  17. public function startQuery($sql, ?array $params = null, ?array $types = null);
  18. /**
  19. * Marks the last started query as stopped. This can be used for timing of queries.
  20. *
  21. * @return void
  22. */
  23. public function stopQuery();
  24. }