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


PHP core\Controller类代码示例

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


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

示例1: error

 /**
  * Error
  *
  * Display an error page if there's no controller
  * that corresponds with the current url.
  */
 private static function error()
 {
     $error = self::$url[0] == '500' ? '500' : '404';
     self::$controller = new Controllers\Error();
     self::$controller->index($error);
     exit;
 }
开发者ID:joaopauloti,项目名称:inmvc,代码行数:13,代码来源:Bootstrap.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->database();
     $this->load->helper(array('view', 'tools'));
     save_log_data();
 }
开发者ID:gkawin,项目名称:siteminder,代码行数:7,代码来源:ViewCancelPolicy.php

示例3:

 function __construct()
 {
     parent::__construct();
     if ($this->uid) {
         $this->redirect('/?m=home');
     }
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:7,代码来源:class.RegisterController.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_files = $this->loadModel('model_files');
     $this->_user = $this->loadModel('model_user');
     $this->checkCookie();
 }
开发者ID:Nattpyre,项目名称:rocketfiles,代码行数:7,代码来源:Files.php

示例5: __construct

 /**
  * Call the parent construct
  */
 public function __construct()
 {
     parent::__construct();
     $this->language->load('Welcome');
     $this->users = new \Models\Users();
     $this->userLogged();
 }
开发者ID:juancabraal,项目名称:vibesetal,代码行数:10,代码来源:Users.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->uid) {
         $this->redirect('/?');
     }
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:7,代码来源:class.LoginController.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->locale->load('Welcome');
     // Model can be initialized in constructur
     // $this->model = new \Modules\Test\Models\SampleModelInModule();
 }
开发者ID:krishnasrikanth,项目名称:smvc-php7,代码行数:7,代码来源:Module_Controller.php

示例8: __construct

 public function __construct()
 {
     // Normally construct the application controller
     parent::__construct();
     // !!! Your module cunstructer here !!! //
     /* 
         Module template option ('module_view_paths') When set to true, the template system will load
         the pages view file from the the templates module view folder if it exists: 
         ( template_path/module_views/module_name/viewname.php )
         
         If it doesnt exist, then it loads the default module view file: 
         ( modules/module_name/views/viewname.php )
         
         If set to false, it will load the default view for the URI 
         ( template_path/views/controller/viewname.php ) ) 
     */
     $this->Template->config('module_view_paths', true);
     /*    
         Example loading a module config file
         First Param => 'Module Name', 
         Second Param => 'Config Array Name', ( !! Must be Unique! Cannot be 'Core', 'App', OR 'DB' !! )
         Third Param => 'Config File Name', 
         Forth Param => 'Array Variable Name' ( !! ONLY IF config options are in an array !! ) 
     */
     load_module_config('Devtest', 'mod_config', 'config.php', 'config_options');
     // Usage
     $this->Config = load_class('Config');
     $this->Config->get('var_name', 'mod_config');
     // OR
     config('var_name', 'mod_config');
 }
开发者ID:Kheros,项目名称:Plexis,代码行数:31,代码来源:controller.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->audit = new \Models\Audit();
     $this->users = new \Models\Users();
     $this->keys = new \Models\Keys();
 }
开发者ID:jnwatts,项目名称:credentials,代码行数:7,代码来源:Audit.php

示例10: __construct

 /**
  * Call the parent construct
  */
 public function __construct()
 {
     parent::__construct();
     $this->language->load('Welcome');
     $this->_pages = new \Models\Pages();
     $this->_welcomes = new \Models\Welcomes();
 }
开发者ID:chriiiish,项目名称:personal,代码行数:10,代码来源:Welcome.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadModel('messageModel');
     $this->loadModel('pageModel');
     $this->loadModel('slideModel');
 }
开发者ID:senioroman4uk,项目名称:Simple-PHP-MVC,代码行数:7,代码来源:DashboardController.php

示例12: __construct

 /**
  * Call the parent construct
  */
 public function __construct()
 {
     parent::__construct();
     $this->entradas = new \Models\Entradas();
     $this->tags = new \Models\Tags();
     $this->entradashastags = new \Models\Entradashastags();
 }
开发者ID:davidcm86,项目名称:simplemvcframework,代码行数:10,代码来源:Entradas.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     if (!Session::get('loggedin')) {
         Url::redirect('login');
     }
 }
开发者ID:alejandrozepeda,项目名称:reaching-outdoors,代码行数:7,代码来源:Dashboard.php

示例14:

 function __construct()
 {
     parent::__construct();
     if (!$this->uid) {
         $this->redirect('/?m=member&c=login');
     }
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:7,代码来源:class.BaseController.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->database();
     $this->load->model('travflex/search_model');
     $this->load->helper(array('view', 'tools'));
     save_log_data();
 }
开发者ID:gkawin,项目名称:siteminder,代码行数:8,代码来源:SearchHotels.php


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