setToken() 공개 정적인 메소드

@return void
public static setToken ( ) : void
리턴 void
예제 #1
0
파일: Html.php 프로젝트: hongweipeng/cmlphp
 /**
  * 渲染模板获取内容 调用内置的模板引擎显示方法,
  *
  * @param string $templateFile 指定要调用的模板文件 默认为空 由系统自动定位模板文件
  * @param bool $inOtherApp 是否为载入其它应用的模板
  *
  * @return string
  */
 public function fetch($templateFile = '', $inOtherApp = false)
 {
     if (Config::get('form_token')) {
         Secure::setToken();
     }
     if (!empty($this->args)) {
         extract($this->args, EXTR_PREFIX_SAME, "xxx");
         $this->args = array();
     }
     ob_start();
     require $this->getFile($this->initBaseDir($templateFile, $inOtherApp));
     return ob_get_clean();
 }