當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。