本文整理汇总了PHP中ContentController::getContentByID方法的典型用法代码示例。如果您正苦于以下问题:PHP ContentController::getContentByID方法的具体用法?PHP ContentController::getContentByID怎么用?PHP ContentController::getContentByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentController
的用法示例。
在下文中一共展示了ContentController::getContentByID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handleInput
/**
* Handles input, by calling according controller,
* an sets view depending on url.
* @return void
*/
public function handleInput()
{
//Create database, get content catalog
$db = new Database();
$contentDAL = new contentDAL($db);
$Catalog = new contentCatalog();
$contentController = new ContentController($contentDAL, $Catalog);
$contentCatalog = $contentController->getContent();
//Handle login
if ($this->navigationView->wantsToLogin()) {
$login = new LoginController($this->users, $this->navigationView);
$this->IsLoggedIn = $login->doLogin();
if ($this->IsLoggedIn) {
$this->navigationView->redirToAdmin();
} else {
$this->view = $login->getOutPut();
}
} else {
if ($this->navigationView->wantsToUpload() && isset($_SESSION['user'])) {
$this->view = new AdminView();
$uploadController = new uploadController($this->view, $contentDAL, $this->users);
$uploadController->doUpload();
} else {
if ($this->navigationView->wantsToReg()) {
$model = new RegFacade($this->userDAL);
$this->view = new RegView($this->navigationView);
$regControl = new RegisterController($model, $this->view);
$regControl->addUser();
$this->view = new RegView($this->navigationView);
} else {
if ($this->navigationView->wantsToViewImage()) {
$this->view = new ImageView();
$imgController = new ImageController($this->view, $contentCatalog);
$imgController->getImage();
} else {
if ($this->navigationView->wantsToViewContent()) {
$commentView = new commentView();
$this->view = new ContentView($commentView);
$id = $this->view->getID();
$commentDAL = new commentDAL($db);
$commentController = new CommentController($commentView, $commentDAL);
$comments = $commentController->doComment($id);
$content = $contentController->getContentByID($id);
$this->view->createHTML($content, $comments);
} else {
$this->view = new galleryView();
$galController = new GalleryController($this->view);
$galController->doGallery($contentCatalog);
}
}
}
}
}
}