SQLLogger.php 810 B

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