1 | <?php |
||
14 | abstract class BaseTemplate implements TemplateInterface |
||
15 | { |
||
16 | /** |
||
17 | * @param string $messages - message text |
||
18 | * @param string $type - message type: success, info, warning, error |
||
19 | * |
||
20 | * @return string |
||
21 | */ |
||
22 | abstract public function wrapMessages($messages, $type); |
||
23 | |||
24 | /** |
||
25 | * @param $message - message text |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | 42 | public function wrapMessage($message) |
|
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | 42 | public function getPrefix() |
|
41 | |||
42 | /** |
||
43 | * @param string $prefix |
||
44 | * |
||
45 | * @return TemplateInterface $this |
||
46 | */ |
||
47 | 4 | public function setPrefix($prefix) |
|
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | 40 | public function getPostfix() |
|
61 | |||
62 | /** |
||
63 | * @param string $postfix |
||
64 | * |
||
65 | * @return TemplateInterface $this |
||
66 | */ |
||
67 | 4 | public function setPostfix($postfix) |
|
73 | |||
74 | /** |
||
75 | * @return string |
||
76 | */ |
||
77 | 40 | public function getWrapper() |
|
81 | |||
82 | /** |
||
83 | * @param string $wrapper |
||
84 | * |
||
85 | * @return TemplateInterface $this |
||
86 | */ |
||
87 | 2 | public function setWrapper($wrapper) |
|
93 | |||
94 | /** |
||
95 | * Check that you have all fields defined in template and throw an exception if not. |
||
96 | * |
||
97 | * @param $name |
||
98 | * |
||
99 | * @throws FlashTemplateException |
||
100 | */ |
||
101 | 2 | public function __get($name) |
|
105 | } |
||
106 |