当前位置: 首页>>代码示例>>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;未经允许,请勿转载。