当前位置: 首页>>代码示例>>PHP>>正文


PHP ContentController::getContentByID方法代码示例

本文整理汇总了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);
                     }
                 }
             }
         }
     }
 }
开发者ID:henceee,项目名称:1DV608_project,代码行数:59,代码来源:MasterController.php


注:本文中的ContentController::getContentByID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。