Exemplo n.º 1
0
 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;
 }
 /** 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;
         }
     }
 }