| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function render($template, $value) |
||
| 30 | { |
||
| 31 | $result = $template; |
||
| 32 | if (!is_array($value)) |
||
| 33 | $value = array('' => $value); |
||
| 34 | |||
| 35 | foreach (new NestedKeyIterator(new RecursiveArrayOnlyIterator($value)) as $key => $value) { |
||
| 36 | $result = str_replace($this->left . $key . $this->right, $value, $result); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $result; |
||
| 40 | } |
||
| 41 | } |