FormatterInterface.php 771 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Monolog\Formatter;
  11. /**
  12. * Interface for formatters
  13. *
  14. * @author Jordi Boggiano <j.boggiano@seld.be>
  15. */
  16. interface FormatterInterface
  17. {
  18. /**
  19. * Formats a log record.
  20. *
  21. * @param array $record A record to format
  22. * @return mixed The formatted record
  23. */
  24. function format(array $record);
  25. /**
  26. * Formats a set of log records.
  27. *
  28. * @param array $records A set of records to format
  29. * @return mixed The formatted set of records
  30. */
  31. function formatBatch(array $records);
  32. }