1: <?php
2:
3: /*
4: * To change this license header, choose License Headers in Project Properties.
5: * To change this template file, choose Tools | Templates
6: * and open the template in the editor.
7: */
8:
9: namespace academicpuma\citeproc;
10:
11: /**
12: * Description of cls_rendering_element
13: *
14: * @author sebastian
15: */
16:
17: class RenderingElement extends Element {
18:
19: function render($data, $mode = NULL) {
20: $text_parts = array();
21:
22: $delim = $this->delimiter;
23: foreach ($this->elements as $element) {
24: $text_parts[] = $element->render($data, $mode);
25: }
26: $text = implode($delim, $text_parts); // insert the delimiter if supplied.
27:
28: return $this->format($text);
29: }
30:
31: }
32:
33: