コード例 #1
0
ファイル: wrapper.php プロジェクト: klawd-prime/lean
 /**
  * Wrap a template
  * @param Template $view
  * @return Template
  */
 public function wrap(Template $view)
 {
     $template = $this->getTemplate();
     $template->set('next', $view);
     if (!$this->wrapper) {
         return $template;
     }
     return $this->wrapper->wrap($template);
 }
コード例 #2
0
ファイル: wrapper.php プロジェクト: sdgdsffdsfff/hdf-client
 public function testWrap()
 {/*{{{*/
     $dir = dirname(__FILE__);
     $wrapper = new Wrapper;
     $xsltFile = $dir.'/demo.xslt';
     $xmlFile = $dir.'/demo.xml';
     $result = $wrapper->wrap($xsltFile, $xmlFile);
     $expectedRes = '<?xml version="1.0" encoding="gbk"?>
                         <document>
                         <item>
                         <hospitalfacultyname>testÒ½Ôºtest¿Æ</hospitalfacultyname>
                         <url>www.haodf.com</url>
                         </item>
                         </document>';
     $resArray = XString::xmlToArray($result);
     $expectedResArray = XString::xmlToArray($expectedRes);
     $this->assertEquals($expectedResArray, $resArray);
 }/*}}}*/
コード例 #3
0
ファイル: AOPWorker.class.php プロジェクト: nicholes-lyt/shop
function testAOP()
{
    // test aop  测试入口
    $aop = Wrapper::wrap(new AOPWorker());
    $aop->testAOP(33347);
}