1 | <?php |
||
14 | class EventTemplate implements Unserializable { |
||
|
|||
15 | use StringTranslationTrait; |
||
16 | |||
17 | /** |
||
18 | * The event identifier. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | public $_id; |
||
23 | |||
24 | /** |
||
25 | * The message "type": a Drupal logger "channel". |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | public $type; |
||
30 | |||
31 | /** |
||
32 | * The event template message with placeholders, not substituted. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | public $message; |
||
37 | |||
38 | /** |
||
39 | * The RFC 5424 severity level. |
||
40 | * |
||
41 | * @var int |
||
42 | */ |
||
43 | public $severity; |
||
44 | |||
45 | /** |
||
46 | * EventTemplate constructor. |
||
47 | * |
||
48 | * @param array $data |
||
49 | * The raw properties. |
||
50 | */ |
||
51 | public function __construct(array $data) { |
||
54 | |||
55 | /** |
||
56 | * List the template keys and their behaviours. |
||
57 | * |
||
58 | * @return array |
||
59 | * A properties by key array. |
||
60 | */ |
||
61 | public static function keys() { |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function bsonUnserialize(array $data) { |
||
93 | |||
94 | /** |
||
95 | * Returns the message with its variables substituted into it. |
||
96 | * |
||
97 | * This code passes a variable to $this->t() because the "variable" ultimately |
||
98 | * comes from a module code, not from user input. This assumes modules |
||
99 | * correctly pass only template messages to PSR-3 methods, instead of already |
||
100 | * assembled messages. |
||
101 | * |
||
102 | * XXX babysit broken modules using messages containing user input. |
||
103 | * |
||
104 | * @param array $variables |
||
105 | * The event variables. |
||
106 | * |
||
107 | * @return \Drupal\Core\StringTranslation\TranslatableMarkup |
||
108 | * The template message with its variables substituted. |
||
109 | */ |
||
110 | public function asString(array $variables) { |
||
113 | |||
114 | } |
||
115 |
This check marks property names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.