Beispiel #1
0
 /**
  * Вызывается перед парсингом шаблонов блока
  */
 public function process()
 {
     $this->_init();
     $this->_processData();
     $data = $this->_setTemplateVariables();
     if (is_array($data)) {
         $this->_templateEngine->setValueOfByArray($data);
     }
 }
Beispiel #2
0
 /**
  * @dataProvider providerTestSetValueOfByArray
  * @param array $data
  */
 public function testSetValueOfByArray(array $data, $actual)
 {
     $keys = array_keys($data);
     array_shift($keys);
     $this->_generateTemplate('val_name', $keys);
     $pn = new Miao_TemplatesEngine_PhpNative($this->_templatesDir);
     $pn->setValueOfByArray($data);
     $expected = $pn->fetch($this->_tmplName);
     $this->assertEquals($expected, $actual);
 }
Beispiel #3
0
 /**
  * Вызывается перед парсингом шаблонов блока
  */
 public function process()
 {
     /// Pointcut: process_p1
     $this->_init();
     $this->_processData();
     /// Pointcut: process_p2
     $data = $this->_setTemplateVariables();
     if (is_array($data)) {
         $this->_templateEngine->setValueOfByArray($data);
     }
     /// Pointcut: process_p3
 }