1 | <?php |
||
13 | class Mustache implements Processor |
||
14 | { |
||
15 | use Processor\Implementation, |
||
16 | Helper\GetByReference |
||
17 | { |
||
18 | Helper\GetByReference::withSourceAndTarget insteadof Processor\Implementation; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Apply processing to a single node |
||
23 | * |
||
24 | * @param Node $node |
||
25 | */ |
||
26 | 5 | public function applyToNode(Node $node) |
|
37 | |||
38 | /** |
||
39 | * Parse a template by mustache if possible and return the result |
||
40 | * |
||
41 | * @param mixed $template |
||
42 | * |
||
43 | * @return mixed $result |
||
44 | */ |
||
45 | 5 | protected function getParsedResult($template) |
|
57 | |||
58 | /** |
||
59 | * Parse an object with mustache |
||
60 | * |
||
61 | * @param object $template |
||
62 | * |
||
63 | * @return object $result |
||
64 | */ |
||
65 | 2 | protected function parseObject($template) |
|
77 | |||
78 | /** |
||
79 | * Parse as mustache template |
||
80 | * |
||
81 | * @param string $template |
||
82 | */ |
||
83 | 5 | protected function parse($template) |
|
90 | } |
||
91 |