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


PHP PageController类代码示例

本文整理汇总了PHP中PageController的典型用法代码示例。如果您正苦于以下问题:PHP PageController类的具体用法?PHP PageController怎么用?PHP PageController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PageController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionOne

 public function actionOne()
 {
     $id = isset($_GET['id']) ? $_GET['id'] : 1;
     $view = new View();
     $page = new PageController();
     $view->assign('item', News::getOne($id));
     $view->assign('links', $page->createLink($this->ctrl));
     $view->display($this->view_one);
 }
开发者ID:alexx-gsm,项目名称:php_blog,代码行数:9,代码来源:AbstractController.php

示例2: run

 function run()
 {
     DB::connect();
     //determin controller
     switch ($_GET['ctrl']) {
         case 'page':
             $ctrl = new PageController();
             break;
         case 'wine':
             $ctrl = new WineController();
             break;
         case 'response':
             $ctrl = new ResponseController();
             break;
         case 'report':
             $ctrl = new ReportController();
             break;
         case 'dp':
             $ctrl = new DianPingController();
             break;
         default:
             $ctrl = new PageController();
     }
     return $ctrl->dispatch($_GET['action'] . "Action");
     DB::close();
 }
开发者ID:innomative,项目名称:16degrees,代码行数:26,代码来源:bootstrap.php

示例3: 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();
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:audef1,项目名称:myShop,代码行数:59,代码来源:RouteController.php

示例4: getController

 public function getController()
 {
     $controllerClass = $this->ClassName . 'Controller';
     if (ClassManifest::has_class($controllerClass)) {
         $controller = new $controllerClass();
     } else {
         $controller = new PageController();
     }
     $controller->setRecord($this);
     return $controller;
 }
开发者ID:pathum,项目名称:mvctest,代码行数:11,代码来源:Page.php

示例5: controlGestion

 /**
  * Validates if there aren't any errors at the image, the rombinoscope or the password.
  **/
 public function controlGestion()
 {
     $pageController = new PageController();
     $erreur = $pageController->uploadPhoto();
     $erreur2 = $pageController->uploadTrombi();
     $erreur3 = $pageController->modifyPassword();
     if ($erreur == 0 && $erreur2 == 0 && $erreur3 == 0) {
         $accountModel = new AccountModel();
         $accountModel->uploadInfoUser();
     } else {
         header('Location: gestion.php');
     }
 }
开发者ID:HectorGlez4,项目名称:zenetude-1,代码行数:16,代码来源:accountcontroller.php

示例6: __construct

 /** Construtor responsavel por selecionar o tipo de banco **/
 public function __construct()
 {
     parent::__construct();
     $this->pageController = PageController::getInstance();
     //$propertiesDom = new PropertiesDom('conf/properties.xml');
     //$this->picture_directory = $propertiesDom->getPropertie("path");
 }
开发者ID:rodrigoprestesmachado,项目名称:whiteboard,代码行数:8,代码来源:AbstractAction.php

示例7: index

 /**
  * 公告列表
  */
 public function index()
 {
     $search = I('get.search');
     // 拼接搜索条件
     $news = D('News');
     // 调用分页控制器实例分页功能
     $page = new PageController();
     $count = $page->getCount('title', $search, $news);
     $show = $page->show($count);
     $list = $page->page('title', $search, $news);
     // 向模板中分配数据及显示模板
     $this->assign('title', '新闻列表');
     $this->assign('count', $count);
     $this->assign('page', $show);
     $this->assign('info', $list);
     $this->display();
 }
开发者ID:pengfen,项目名称:blog,代码行数:20,代码来源:NewsController.class.php

示例8: index

 /**
  * 建议列表
  */
 public function index()
 {
     $search = I('get.search');
     // 拼接搜索条件
     $uid = I('get.id');
     $advice = D('Advice');
     // 调用分页控制器实例分页功能(注意写入的字段和数据库中的字段必须一致)
     $page = new PageController();
     if (!$uid) {
         // 所有用户的分类列表
         // $info = D('LogCate') -> select();
         $count = $page->getCount('name', $search, $advice);
         $show = $page->show($count);
         $list = $page->page('name', $search, $advice);
     } else {
         // 具体用户的分类列表
         $count = $page->getCount('name', $search, $advice, 'uid=' . $uid);
         $show = $page->show($count);
         $list = $page->page('name', $search, $advice, 'uid=' . $uid);
         $name = I('get.name');
         $this->assign('name', $name);
     }
     //$data = D('Advice') -> where(array('uid'=>$id)) -> select();
     $this->assign('count', $count);
     $this->assign('page', $show);
     $this->assign('info', $list);
     $this->display();
 }
开发者ID:pengfen,项目名称:blog,代码行数:31,代码来源:AdviceController.class.php

示例9: __construct

 /**
  * __construct
  *
  * PageController constructor
  *
  * @param string $template
  */
 public function __construct($template = null, $post_type = null)
 {
     $this->post_type = $post_type ? $post_type : get_post_type();
     if (!$template) {
         // try to guess the view for custom post types
         $template = sprintf("single%s.twig", $this->post_type === 'post' ? '' : "-{$this->post_type}");
     }
     parent::__construct(array($template, 'single.twig'));
 }
开发者ID:benedict-w,项目名称:pressgang,代码行数:16,代码来源:post-controller.php

示例10: admin_login

 /**
  * Log user in using the standard Chamilo way of logging in.
  * Useful when the normal login screen is removed from the user interface
  * - replaced by Shibboleth login - and user want to login using a standard
  * account
  */
 public function admin_login()
 {
     $title = get_lang('internal_login');
     if (Shibboleth::session()->is_logged_in()) {
         $message = get_lang('already_logged_in');
         Shibboleth::display()->message_page($message, $title);
     }
     $html = PageController::displayLoginForm();
     Shibboleth::display()->page($html, $title);
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:16,代码来源:shibboleth_controller.class.php

示例11: ActionCreateQuiz

 public static function ActionCreateQuiz()
 {
     if (ModeratorModel::isModerator() and isset($_POST['id']) and isset($_POST['number'])) {
         $variables = ['template' => 'panel.php', 'panel_template' => 'moderator_create_quiz.php', 'id' => $_POST['id'], 'number' => $_POST['number']];
         $variables = array_merge_recursive(PageController::getMainVariables(), $variables);
         Template::render('template.php', $variables);
     } else {
         header('Location: ' . $_SERVER['HTTP_REFERER']);
     }
 }
开发者ID:yasch-kub,项目名称:auroracing.com,代码行数:10,代码来源:ModeratorController.php

示例12: ActionThemes

 public static function ActionThemes()
 {
     if (AdminModel::isAdmin()) {
         $variables = ['template' => 'panel.php', 'panel_template' => 'admin_themes.php', 'themes' => AdminModel::getThemes()];
         $variables = array_merge_recursive(PageController::getMainVariables(), $variables);
         Template::render('template.php', $variables);
     } else {
         header('Location: ' . $_SERVER['HTTP_REFERER']);
     }
 }
开发者ID:yasch-kub,项目名称:auroracing.com,代码行数:10,代码来源:AdminController.php

示例13: ActionProfile

 public static function ActionProfile()
 {
     $user = UserModel::getUser(UserModel::getUserId());
     if (UserModel::isUserLoggedIn()) {
         $variables = ['template' => 'profile.php', 'links' => ['profile.css'], 'scripts' => ['fileUploader.js'], 'themes' => AdminModel::getThemes(), 'profile' => ['id' => UserModel::getUserId(), 'email' => $user['email'], 'about' => $user['about']]];
         $variables = array_replace_recursive(PageController::getMainVariables(), $variables);
         Template::render('template.php', $variables);
     } else {
         header("Location: " . $_SERVER['HTTP_REFERER']);
     }
 }
开发者ID:yasch-kub,项目名称:auroracing.com,代码行数:11,代码来源:UserController.php

示例14: showlist

 /**
  * 前台目录列表
  */
 public function showlist()
 {
     $search = I('get.search');
     // 拼接搜索条件
     $dir = D('Dir');
     // 调用分页控制器实例分页功能(注意写入的字段和数据库中的字段必须一致)
     $page = new PageController();
     $count = $page->getCount('name', $search, $dir, 'flag=1');
     $show = $page->show($count);
     $list = $page->page('name', $search, $dir, 'flag=1');
     // // 获取前台目录列表信息
     // $info = D('Dir') -> where(array('flag'=>'1')) -> select();
     // 向模板中分配数据及显示模板
     $this->assign('title', '前台目录列表');
     $this->assign('flag', '1');
     $this->assign('info', $list);
     $this->assign('count', $count);
     $this->assign('page', $show);
     $this->display('Dir/index');
 }
开发者ID:pengfen,项目名称:resource,代码行数:23,代码来源:DirController.class.php

示例15: __construct

  public function __construct()
  {
    parent::__construct();

    global $container;
    $this->activityRepository = new Jacobemerick\Web\Domain\Stream\Activity\MysqlActivityRepository($container['db_connection_locator']);
  }
开发者ID:jacobemerick,项目名称:web,代码行数:7,代码来源:DefaultPageController.class.inc.php


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