1 | <?php |
||
12 | class Smarty extends TemplateEngine |
||
13 | { |
||
14 | private $smarty; |
||
15 | |||
16 | 2 | private function getSmarty($data) |
|
|
|||
17 | { |
||
18 | 2 | if($this->smarty === null) |
|
19 | { |
||
20 | 2 | $this->smarty = new smarty\Engine(); |
|
21 | } |
||
22 | 2 | $this->smarty->clearAllAssign(); |
|
23 | 2 | $data['honam'] = $this->getHelpersLoader(); |
|
24 | 2 | $this->smarty->assign($data); |
|
25 | 2 | return $this->smarty; |
|
26 | } |
||
27 | |||
28 | 2 | protected function generate($data) |
|
32 | |||
33 | protected function generateFromString($string, $data) |
||
37 | |||
38 | } |
||
39 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.