本文整理汇总了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);
}
示例2: array
function __construct()
{
parent::getModel("intranetProduct");
$tabl = array();
$this->tabl['article01'] = $this->modelInstance->getAllArticlesOrderedByName();
parent::getView("intranetProduct", $this->tabl);
}
示例3: array
function __construct()
{
parent::getModel("intranetHome");
$tabl = array();
$this->tabl['article01'] = $this->modelInstance->getMissingArticles();
parent::getView("intranetHome", $this->tabl);
}
示例4: array
function __construct()
{
parent::getModel("intranetAddNew");
$tabl = array();
$this->tabl['id'] = $this->modelInstance->newArticle();
parent::getView("intranetAddNew", $this->tabl);
}
示例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);
}
示例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);
}
示例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());
}
示例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();
}
}
示例9: array
function __construct()
{
parent::getModel("intranetAdd");
$tabl = array();
parent::getView("intranetAdd", $tabl);
}
示例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;
}
示例11: getBody
/**
* Gets the body of the website, generated through the view.
* @return string
*/
public function getBody()
{
return $this->controller->getView($this->view)->getContents();
}
示例12:
function __construct()
{
parent::getModel("Default");
$this->d = @$_POST['user'] ? $_POST['user'] : "";
parent::getView("Default", $this->d);
}