1 | <?php |
||
28 | trait FormatterAwareTrait |
||
29 | { |
||
30 | /** |
||
31 | * Message formatter |
||
32 | * |
||
33 | * Formatter is shared by all descendant message classes. |
||
34 | * |
||
35 | * @var FormatterInterface |
||
36 | * @access private |
||
37 | */ |
||
38 | private static $formatter; |
||
39 | |||
40 | /** |
||
41 | * Set formatter |
||
42 | * |
||
43 | * @param FormatterInterface $formatter the message formatter |
||
44 | * @access public |
||
45 | * @api |
||
46 | */ |
||
47 | public static function setFormatter( |
||
52 | |||
53 | /** |
||
54 | * Unset formatter |
||
55 | * |
||
56 | * @access public |
||
57 | * @api |
||
58 | */ |
||
59 | public static function unsetFormatter() |
||
63 | |||
64 | /** |
||
65 | * Get formatter. if not set, use the `DefaultFormatter` |
||
66 | * |
||
67 | * @return FormatterInterface |
||
68 | * @access protected |
||
69 | */ |
||
70 | protected static function getFormatter()/*# : FormatterInterface */ |
||
77 | } |
||
78 |