Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Logger/LogMessageParserInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Logger; | |
4 | |
5 /** | |
6 * Defines an interface for parsing log messages and their placeholders. | |
7 */ | |
8 interface LogMessageParserInterface { | |
9 | |
10 /** | |
11 * Parses and transforms message and its placeholders to a common format. | |
12 * | |
13 * For a value to be considered as a placeholder should be in the following | |
14 * formats: | |
15 * - PSR3 format: | |
16 * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#12-message | |
17 * - Drupal specific string placeholder format: | |
18 * @see \Drupal\Component\Utility\SafeMarkup::format() | |
19 * | |
20 * Values in PSR3 format will be transformed to SafeMarkup::format() format. | |
21 * | |
22 * @param string $message | |
23 * The message that contains the placeholders. | |
24 * If the message is in PSR3 style, it will be transformed to | |
25 * \Drupal\Component\Utility\SafeMarkup::format() style. | |
26 * @param array $context | |
27 * An array that may or may not contain placeholder variables. | |
28 * | |
29 * @return array | |
30 * An array of the extracted message placeholders. | |
31 */ | |
32 public function parseMessagePlaceholders(&$message, array &$context); | |
33 | |
34 } |