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


PHP Controller::getView方法代碼示例

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


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

示例1: __get

 /**
  * Overriding parent
  *
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     // View
     if ($name == 'view') {
         return $this->_controllerInstance->getView();
     }
     // Request
     if ($name == 'request') {
         return $this->_controllerInstance->getRequest();
     }
     // Response
     if ($name == 'response') {
         return $this->_controllerInstance->getResponse();
     }
     // POST
     if ($name == 'post') {
         return $this->_controllerInstance->getRequest()->getPost();
     }
     // GET
     if ($name == 'query') {
         return $this->_controllerInstance->getRequest()->getQuery();
     }
     // URL parameters
     if ($name == 'params') {
         return $this->_controllerInstance->getRequest()->getParams();
     }
     // application env
     if ($name == 'appEnv') {
         return $this->_controllerInstance->getAppEnv();
     }
     parent::__get($name);
 }
開發者ID:2626suke,項目名稱:curryfw,代碼行數:38,代碼來源:plugin_abstract.php

示例2: array

 function __construct()
 {
     parent::getModel("intranetProduct");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getAllArticlesOrderedByName();
     parent::getView("intranetProduct", $this->tabl);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:7,代碼來源:intranetProduct.php

示例3: array

 function __construct()
 {
     parent::getModel("intranetHome");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getMissingArticles();
     parent::getView("intranetHome", $this->tabl);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:7,代碼來源:intranetHome.php

示例4: array

 function __construct()
 {
     parent::getModel("intranetAddNew");
     $tabl = array();
     $this->tabl['id'] = $this->modelInstance->newArticle();
     parent::getView("intranetAddNew", $this->tabl);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:7,代碼來源:intranetAddNew.php

示例5: array

 function __construct()
 {
     parent::getModel("intranetAddModify");
     $tabl = array();
     $this->id = $_GET['id'];
     $this->tabl['id'] = $this->modelInstance->getArticleById($this->id);
     parent::getView("intranetAddModify", $this->tabl);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:8,代碼來源:intranetModify.php

示例6: array

 function __construct()
 {
     parent::getModel("shopHome");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getArticle();
     $this->tabl['img'] = $this->tabl['article01'][0]['IMAGE'];
     parent::getView("shopHome", $this->tabl);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:8,代碼來源:shopHome.php

示例7: testSetNoRender

 public function testSetNoRender()
 {
     $v = new View();
     $v->setViewPath(__DIR__ . '/views');
     $this->object->setView($v);
     $this->object->value = "hello";
     $this->assertSame($v, $this->object->getView());
     $this->object->setNoRender();
     $this->assertNotSame($v, $this->object->getView());
 }
開發者ID:elvis2,項目名稱:simple-mvc,代碼行數:10,代碼來源:ControllerTest.php

示例8: Request

 /**
  * Constructor
  */
 function __construct()
 {
     // Merge GET and POST params
     $oRequest = new Request(array_merge($_GET, $_POST));
     // Create main view
     $this->oMainView = new View('gabarit');
     $this->oMainView->addData('title', Config::get('sitetitle'));
     try {
         // Create associated controller
         $this->createController($oRequest);
         // Execute controller
         $this->oController->procede();
         $this->oMainView->addData('menuItems', $this->createMenu());
         $this->oMainView->addData('login', $this->oController->getCurrentUser()->getLogin());
         $this->oMainView->addData('body', $this->oController->getView());
         $this->oMainView->addData('script', $this->oController->getJS());
     } catch (Error $e) {
         $this->oMainView->addAlert($e, 'danger');
     } finally {
         // Create the main view
         $this->oMainView->create();
     }
 }
開發者ID:Jatax,項目名稱:TKS,代碼行數:26,代碼來源:router.class.php

示例9: array

 function __construct()
 {
     parent::getModel("intranetAdd");
     $tabl = array();
     parent::getView("intranetAdd", $tabl);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:6,代碼來源:intranetAdd.php

示例10: completed

    private function completed()
    {
        global $phpEx;
        if ($_GET['from'] == "posting") {
            $url = "posting." . $phpEx . "?mode=" . $_GET['mode'] . "&";
            if ($_GET['mode'] == "newtopic") {
                $url .= "f=" . urlencode($_GET['f']);
            } else {
                if ($_GET['mode'] == "reply") {
                    $url .= "t=" . urlencode($_GET['t']);
                } else {
                    $url .= "p=" . urlencode($_GET['p']);
                }
            }
            header("Location: " . append_sid($url));
        }
    }
    public function getView()
    {
        return $this->view;
    }
}
$controller = new Controller();
$controller->start();
$view = $controller->getView();
if ($view) {
    $page_title = 'Quiz';
    require_once $phpbb_root_path . 'includes/page_header.' . $phpEx;
    $view->display();
    require_once $phpbb_root_path . 'includes/page_tail.' . $phpEx;
}
開發者ID:puring0815,項目名稱:OpenKore,代碼行數:31,代碼來源:quiz.php

示例11: getBody

 /**
  * Gets the body of the website, generated through the view.
  * @return string
  */
 public function getBody()
 {
     return $this->controller->getView($this->view)->getContents();
 }
開發者ID:Zyr93,項目名稱:DiamondMVC,代碼行數:8,代碼來源:class_template.php

示例12:

 function __construct()
 {
     parent::getModel("Default");
     $this->d = @$_POST['user'] ? $_POST['user'] : "";
     parent::getView("Default", $this->d);
 }
開發者ID:znk,項目名稱:exiastore,代碼行數:6,代碼來源:Default.php


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