| 1 | <?php |
||
| 12 | class Smarty extends TemplateEngine |
||
| 13 | { |
||
| 14 | private $smarty; |
||
| 15 | |||
| 16 | 1 | private function getSmarty($data) |
|
|
|
|||
| 17 | { |
||
| 18 | 1 | if($this->smarty === null) |
|
| 19 | { |
||
| 20 | 1 | $this->smarty = new smarty\Engine(); |
|
| 21 | } |
||
| 22 | 1 | $this->smarty->clearAllAssign(); |
|
| 23 | 1 | $data['honam'] = $this->getHelpersLoader(); |
|
| 24 | 1 | $this->smarty->assign($data); |
|
| 25 | 1 | return $this->smarty; |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | 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
@returnannotation as described here.