コード例 #1
0
ファイル: MonoBookCBT.php プロジェクト: biribogos/wikihow-src
 function executeTemplate($template)
 {
     $fname = 'SkinMonoBookCBT::executeTemplate';
     wfProfileIn($fname);
     $tp = new CBTProcessor($template, $this);
     $tp->mFunctionCache = $this->mFunctionCache;
     $this->mCompiling = true;
     $text = $tp->execute();
     $this->mCompiling = false;
     $this->mFunctionCache = $tp->mFunctionCache;
     wfProfileOut($fname);
     return $text;
 }
コード例 #2
0
 /** If the value is a template, execute it */
 function execute(&$processor)
 {
     if ($this->mIsTemplate) {
         $myProcessor = new CBTProcessor($this->mText, $processor->mFunctionObj, $processor->mIgnorableDeps);
         $myProcessor->mCompiling = $processor->mCompiling;
         $val = $myProcessor->doText(0, strlen($this->mText));
         if ($myProcessor->getLastError()) {
             $processor->error($myProcessor->getLastError());
             $this->mText = '';
         } else {
             $this->mText = $val->mText;
             $this->addDeps($val);
         }
         if (!$processor->mCompiling) {
             $this->mIsTemplate = false;
         }
     }
 }