public function doRun() { $urlView = new \view\URLView(); $pv = new \view\ProductView($urlView); //Please note that this is "controller code..." if ($pv->customerInspectsProduct()) { $p = $pv->getSelectedProduct($this->productCatalog); $likeModel = new \model\LikeModel($p); $likeView = new \view\LikeView($likeModel, $urlView); $likeController = new \controller\LikeController($likeModel, $likeView); $likeController->doControll(); $xhtml = $pv->getProduct($p, $likeView); } else { $xhtml = $pv->getProductList($this->productCatalog); } return $xhtml; }
<?php session_start(); require_once "LikeView.php"; require_once "LikeController.php"; require_once "../Common/HTMLView.php"; $xhtml = ""; $likeController = new \controller\LikeController(); $xhtml .= $likeController->doControll(); $pageView = new common\view\HTMLView("utf-8"); echo $pageView->getHTMLPage("I like it!", $xhtml);