當前位置: 首頁>>代碼示例>>PHP>>正文


PHP view::display方法代碼示例

本文整理匯總了PHP中view::display方法的典型用法代碼示例。如果您正苦於以下問題:PHP view::display方法的具體用法?PHP view::display怎麽用?PHP view::display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在view的用法示例。


在下文中一共展示了view::display方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 /**
  * 顯示視圖
  * @param null $tplFile 模板文件
  * @param int $cacheTime 緩存時間
  * @param null $cachePath 緩存目錄
  * @param string $contentType 文件類型
  * @param bool $show 是否顯示
  * @return mixed
  */
 protected function display($tplFile = null, $cacheTime = -1, $cachePath = null, $contentType = "text/html", $show = true)
 {
     Hook::listen("VIEW_START");
     //執行視圖對象中的display同名方法
     $status = $this->view->display($tplFile, $cacheTime, $cachePath, $contentType, $show);
     Hook::listen("VIEW_END");
     return $status;
 }
開發者ID:suhanyujie,項目名稱:spider,代碼行數:17,代碼來源:AddonController.class.php

示例2: setView

 public function setView($data = array(), $template = '')
 {
     if ($this->coustomData) {
         foreach ($this->coustomData as $dkey => $dval) {
             $this->defaultDataArr[$dkey] = $dval;
         }
     }
     $this->defaultDataArr['style'] = $this->style;
     $this->defaultDataArr['title'] = $this->title;
     $this->defaultDataArr['url'] = base64_encode($this->url);
     $data = array_merge($this->defaultDataArr, $data);
     if (empty($template)) {
         if (request::$newPath) {
             $template .= request::$newPath . '/';
         } else {
             $template .= 'home/';
         }
         $viewControll = str_replace('Controller', '', request::$controllerName);
         $template .= $viewControll . '/' . request::$actionName;
     }
     try {
         view::display($data, $template);
     } catch (myException $e) {
         $e->writeLogException();
     }
 }
開發者ID:lzmyoyo,項目名稱:ninxingfu,代碼行數:26,代碼來源:controller.php

示例3: __destruct

 /**
  * 析構函數
  */
 public function __destruct()
 {
     global $lang;
     view::assign('class', sharePHP::get_class());
     view::assign('action', sharePHP::get_method());
     view::display();
 }
開發者ID:kansifang,項目名稱:share,代碼行數:10,代碼來源:admin.php

示例4: send

 /**
  * 發送簡曆
  */
 function send()
 {
     if (input::getInput("post")) {
         $back = sf::getModel("backs");
         $back->setSubject(input::getInput("post.subject"));
         $back->setUserName(input::getInput("post.user_name"));
         $back->setUserSex(input::getInput("post.user_sex"));
         $back->setUserAge(input::getInput("post.user_age"));
         $back->setUserDegree(input::getInput("post.user_degree"));
         $back->setIdcard(input::getInput("post.idcard"));
         $back->setUserPhone(input::getInput("post.user_phone"));
         $back->setUserIm(input::getInput("post.user_im"));
         $back->setUserEmail(input::getInput("post.user_email"));
         $back->setUserAddress(input::getInput("post.user_address"));
         $back->setPostCode(input::getInput("post.post_code"));
         $back->setWorkAt(input::getInput("post.work_at"));
         $back->setStudyList(input::getInput("post.study_list"));
         $back->setWorkList(input::getInput("post.work_list"));
         $back->setUpdatedAt(date("Y-m-d H:i:s"));
         $back->save();
         $this->page_debug(lang::get("Has been saved!"), site_url("job/index"));
     }
     view::set("job", sf::getModel("jobs", input::getInput("get.id")));
     view::apply("inc_body", "template/job_send");
     view::display("template/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:29,代碼來源:Job.php

示例5: show

 /**
  * 查看模板
  */
 function show()
 {
     $template = sf::getModel("templates", input::getInput("get.id"));
     view::set("template", $template);
     view::apply("inc_body", "admin/template/show");
     view::display("admin/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:10,代碼來源:Template.php

示例6: main

 function main()
 {
     $data['user'] = sf::getModel("managers", input::getInput("session.userid"));
     view::set($data);
     view::apply("inc_body", "admin/main");
     view::display("admin/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:7,代碼來源:Home.php

示例7: index

 function index()
 {
     $page = sf::getModel("pages")->showPage($this->type, input::getInput("get.id"));
     config::set('title', $page->getSubject());
     view::set("page", $page);
     view::apply("inc_body", "template/about_us");
     view::display("template/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:8,代碼來源:Page.php

示例8: actionOne

 public function actionOne()
 {
     $id = $_GET['id'];
     $item = News::getOne($id);
     $view = new view();
     $view->item = $item;
     $view->display('news/one.php');
 }
開發者ID:seclace,項目名稱:news,代碼行數:8,代碼來源:newsController.php

示例9: show

 /**
  * 查看新聞
  */
 function show()
 {
     $article = sf::getModel("articles", input::getInput("get.id"));
     //設置頁麵title
     config::set('title', $article->getSubject());
     view::set("article", $article);
     view::apply("inc_body", "template/article_show");
     view::display("template/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:12,代碼來源:Article.php

示例10: show

 /**
  * 查看產品
  */
 function show()
 {
     $product = sf::getModel("products", input::getInput("get.id"));
     //設置頁麵title
     config::set('title', $product->getSubject());
     view::set("product", $product);
     view::apply("inc_body", "template/product_show");
     view::display("template/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:12,代碼來源:Product.php

示例11: show

 static function show($msg, $title = '操作失敗', $cacheId = 'null', $cacheTime = -1)
 {
     $error = new view();
     $error->template_dir = _FFPHP_ . 'extend';
     $error->assign('title', $title);
     $error->assign('msg', $msg);
     $error->display('template/error');
     exit;
 }
開發者ID:laiello,項目名稱:ffphp,代碼行數:9,代碼來源:debug.class.php

示例12: index

 function index()
 {
     if (input::getInput("post.site")) {
         $htmlStr = $this->getHtmlStr(input::getInput("post.site"));
         file_put_contents(APPPATH . "config/Config.config.php", "<?php\r\n" . 'config::set(' . $htmlStr . ");\r\n?>");
         $this->page_debug(lang::get('Has been save!'), getFromUrl());
     }
     view::apply("inc_body", "admin/configure/index");
     view::display("admin/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:10,代碼來源:Configure.php

示例13: index

 function index()
 {
     $addWhere = $addSql = '';
     $addSql = "order by updated_at DESC";
     $addWhere .= " is_public = 1 ";
     input::getInput("post.search") && ($addWhere .= " AND `content` LIKE '%" . trim(input::getInput("post.search")) . "%' ");
     //取得帶翻頁的數據集
     $from_vars = array('field', 'search', 'type');
     view::set("pager", sf::getModel("books")->getPager($addWhere, $addSql, 5, '', '', $from_vars));
     view::apply("inc_body", "template/book");
     view::display("template/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:12,代碼來源:Book.php

示例14: edit_back

 function edit_back()
 {
     $back = sf::getModel("backs", input::getInput("post.id") ? input::getInput("post.id") : input::getInput("get.id"));
     if (input::getInput("post.note")) {
         $back->setNote(input::getInput("post.note"));
         $back->save();
         $this->page_debug(lang::get("Has been saved!"), site_url("admin/job/back"));
     }
     view::set("back", $back);
     view::apply("inc_body", "admin/job/edit_back");
     view::display("admin/page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:12,代碼來源:Job.php

示例15: edit

 /**
  * 數據編輯
  */
 function edit()
 {
     $filemanager = sf::getModel("filemanager", input::getInput("post.id") ? input::getInput("post.id") : input::getInput("get.id"));
     if (input::getInput("post.file_note")) {
         input::getInput("post.file_note") && $filemanager->setFileNote(input::getInput("post.file_note"));
         input::getInput("post.file_name") && $filemanager->setFileName(input::getInput("post.file_name"));
         $filemanager->save();
         $this->page_debug(lang::get("Has been saved!"), getFromUrl());
     }
     view::set("filemanager", $filemanager);
     view::apply("inc_body", "filemanager/edit");
     view::display("page");
 }
開發者ID:GitBeBest,項目名稱:sf-framwork,代碼行數:16,代碼來源:Files.php


注:本文中的view::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。