Example #1
0
 /**
  * 
  * check it
  * @param array $value
  * @param string $type
  */
 public function checkIt($token = array(), $type = '')
 {
     if ($this->isXml && $type == 'html') {
         $type = 'xml';
     }
     if (!$this->containTpl($token['value'])) {
         return $token['value'];
     }
     $return = Fl_Tpl::factory($this)->xss($token, $type, $this);
     if ($return['log']) {
         $this->log = array_merge($this->log, $return['log']);
     }
     return $return['value'];
 }
Example #2
0
 /**
  * 
  * 获取模版语法的Token
  * @param object $obj
  */
 public function getTplToken()
 {
     if ($this->tplTokenHasChecked && !$this->hasTplToken) {
         return false;
     }
     if (!$this->checkHasTplToken() || !$this->startWith($this->ld)) {
         return false;
     }
     return Fl_Tpl::factory($this)->getToken($this);
 }
Example #3
0
 /**
  * 
  * 压缩模版语法
  * @param array $token
  */
 public function compressTpl($token)
 {
     Fl::loadClass('Fl_Tpl');
     return Fl_Tpl::factory($this)->compress($token['value'], $this);
 }
Example #4
0
 /**
  * 
  * 检测模版语法是否会输出
  */
 public function checkTplHasOutput($tpl)
 {
     return Fl_Tpl::factory($this)->checkHasOutput($tpl, $this);
 }
Example #5
0
 /**
  * 
  * 获取模版语法的Token
  * @param object $obj
  */
 public function getTplToken()
 {
     if (!$this->checkHasTplToken() || !$this->startWith($this->ld)) {
         return false;
     }
     Fl::loadClass('Fl_Tpl');
     return Fl_Tpl::factory($this)->getToken($this);
 }
Example #6
0
 /**
  * 
  * 压缩模版语法
  * @param array $token
  */
 public function compressTpl($token)
 {
     return Fl_Tpl::factory($this)->compress($token['value'], $this);
 }