コード例 #1
0
ファイル: ViewBlock.class.php プロジェクト: natalikom/miao
 protected function _init()
 {
     $templatesDir = $this->getTemplatesDir();
     if (is_null($this->_templateEngine)) {
         $this->_templateEngine = new Miao_TemplatesEngine_PhpNative($templatesDir);
     } else {
         $this->_templateEngine->setTemplatesDir($templatesDir);
         $this->_templateEngine->resetTemplateVariables();
     }
 }
コード例 #2
0
ファイル: PhpNative.class.Test.php プロジェクト: theratg/miao
 /**
  * @dataProvider data4SetTemplatesDir
  *
  */
 public function testSetTemplatesDir($in, $out)
 {
     $pn = new Miao_TemplatesEngine_PhpNative();
     $pn->setTemplatesDir($in);
     $this->assertEquals($pn->getTemplatesDir(), $out);
 }