示例#1
0
 /**
  * @todo Implement testSetup().
  */
 public function testSetup()
 {
     $registerData = array();
     SmartyWrapper::setup(new UnitTestPWECore(), $registerData);
 }
示例#2
0
文件: PWECore.php 项目: undera/pwe
 public function addContent(SmartyWrapper $smarty, $tag = false)
 {
     $this->htmlContent[$tag] .= $smarty->fetchAll();
     PWELogger::debug("Content %s [%d]: %s...", $tag, strlen($this->htmlContent[$tag]), substr($this->htmlContent[$tag], 0, 64));
 }
示例#3
0
文件: SimpleWiki.php 项目: undera/pwe
 /**
  * @param $contents
  * @param $dir
  * @param $ext
  */
 private function processSmarty($contents, $dir, $ext)
 {
     $node = $this->PWE->getNode();
     $tpl = $node['!i']['layout_tpl'] ?: __DIR__ . '/wiki.tpl';
     $smarty = new SmartyWrapper($this->PWE);
     $smarty->setTemplateFile($tpl);
     $smarty->assign('content', $contents);
     if ($this->config instanceof TOCProvider) {
         $sidebar = $this->config->getToc();
     } else {
         $sidebar = "";
     }
     if (!$node['!a']['no_sidebar_file'] && is_file($dir . '/Sidebar.' . $ext)) {
         $sidebar .= $this->renderPage($dir . '/Sidebar.' . $ext);
     }
     $smarty->assign("sidebar", $sidebar);
     $this->PWE->addContent($smarty);
 }