1 | <?php |
||
12 | abstract class AbstractRenderer implements \ArrayAccess |
||
13 | { |
||
14 | |||
15 | protected $offset = []; |
||
16 | |||
17 | /** |
||
18 | * template function. |
||
19 | * |
||
20 | * @access protected |
||
21 | * @abstract |
||
22 | * @param mixed $template |
||
23 | */ |
||
24 | abstract protected function template($template); |
||
25 | |||
26 | /** |
||
27 | * render function. |
||
28 | * |
||
29 | * @access public |
||
30 | * @abstract |
||
31 | * @param ResponseInterface $response |
||
32 | * @param mixed $template |
||
33 | * @param mixed $data (default: []) |
||
34 | * @return ResponseInterface |
||
35 | */ |
||
36 | abstract public function render(ResponseInterface $response, $template, $data = []); |
||
37 | |||
38 | /** |
||
39 | * merge_data function. |
||
40 | * |
||
41 | * @access protected |
||
42 | * @param mixed $data |
||
43 | * @return array |
||
44 | */ |
||
45 | protected function merge_data($data) |
||
49 | |||
50 | /** |
||
51 | * loadConfig function. |
||
52 | * |
||
53 | * @access public |
||
54 | * @param array $offset |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function loadConfig(array $offset) |
||
63 | |||
64 | /** |
||
65 | * ArrayAccess Implementations |
||
66 | */ |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function offsetExists($key) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function offsetGet($key) |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function offsetSet($key, $value) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function offsetUnset($key) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function count() |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getIterator() |
||
115 | |||
116 | } |
||
117 |