本文整理汇总了PHP中PageController::renderView方法的典型用法代码示例。如果您正苦于以下问题:PHP PageController::renderView方法的具体用法?PHP PageController::renderView怎么用?PHP PageController::renderView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageController
的用法示例。
在下文中一共展示了PageController::renderView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderView
public function renderView()
{
if (!isset($_SESSION['cart'])) {
$cart = new Cart();
$_SESSION['cart'] = serialize($cart);
}
foreach ($this->model->getUris() as $key => $value) {
if (preg_match("#^{$value}\$#", $this->uriView)) {
if ($this->model->getView($key) === "PageView") {
$pagecontroller = new PageController($this->additionalParam);
$pagecontroller->renderView();
} else {
if ($this->model->getView($key) === "ProductView") {
$productscontroller = new ProductsController();
$productscontroller->renderView();
} else {
if ($this->model->getView($key) === "SingleProductView") {
$singleproductcontroller = new SingleProductController($this->additionalParam);
$singleproductcontroller->renderView();
} else {
if ($this->model->getView($key) === "LoginView") {
$logincontroller = new LoginController($this->additionalParam);
$logincontroller->renderView();
} else {
if ($this->model->getView($key) === "CustomerView") {
$customercontroller = new CustomerController();
$customercontroller->renderView();
} else {
if ($this->model->getView($key) === "CartView") {
$cartcontroller = new CartController($this->additionalParam);
$cartcontroller->renderView();
} else {
if ($this->model->getView($key) === "ContactView") {
$contactcontroller = new ContactController($this->additionalParam);
$contactcontroller->renderView();
} else {
if ($this->model->getView($key) === "RegisterView") {
$registrationcontroller = new RegistrationController($this->additionalParam);
$registrationcontroller->renderView();
} else {
if ($this->model->getView($key) === "CheckoutView") {
$checkoutcontroller = new CheckoutController($this->additionalParam);
$checkoutcontroller->renderView();
} else {
$useView = $this->model->getView($key);
$view = new $useView();
$view->render();
}
}
}
}
}
}
}
}
}
}
}
}