當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Front_Controller::__construct方法代碼示例

本文整理匯總了PHP中Front_Controller::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Front_Controller::__construct方法的具體用法?PHP Front_Controller::__construct怎麽用?PHP Front_Controller::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Front_Controller的用法示例。


在下文中一共展示了Front_Controller::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 function __construct()
 {
     parent::__construct();
     $this->load->model('Category_model');
     $this->load->model('Product_model');
     $this->load->model('Option_model');
 }
開發者ID:FAVHYAN,項目名稱:a3workout,代碼行數:7,代碼來源:packages.php

示例2: redirect

 function __construct()
 {
     parent::__construct();
     /*make sure the cart isnt empty*/
     if ($this->jcart->total_items() == 0) {
         redirect('cart/view_cart');
     }
     /*is the user required to be logged in?*/
     if (config_item('require_login')) {
         $this->Customer_model->is_logged_in('checkout');
     }
     if (!config_item('allow_os_purchase') && config_item('inventory_enabled')) {
         /*double check the inventory of each item before proceeding to checkout*/
         $inventory_check = $this->jcart->check_inventory();
         if ($inventory_check) {
             /*
             OOPS we have an error. someone else has gotten the scoop on our customer and bought products out from under them!
             we need to redirect them to the view cart page and let them know that the inventory is no longer there.
             */
             $this->session->set_flashdata('error', $inventory_check);
             redirect('cart/view_cart');
         }
     }
     /* Set no caching
     	
     		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     		header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
     		header("Cache-Control: no-store, no-cache, must-revalidate"); 
     		header("Cache-Control: post-check=0, pre-check=0", false);
     		header("Pragma: no-cache");
     	
     		*/
     $this->load->library('form_validation');
 }
開發者ID:nagsamayam,項目名稱:jcom,代碼行數:34,代碼來源:Checkout.php

示例3: __construct

 /**
  * Constructor
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->library('form_validation');
     $this->lang->load('faq');
     Assets::add_module_js('faq', 'faq.js');
 }
開發者ID:fbmfbm,項目名稱:drhil01,代碼行數:12,代碼來源:faq.php

示例4:

 function __construct()
 {
     parent::__construct();
     force_ssl();
     $this->load->model(array('location_model'));
     $this->load->helper(array('form', 'url'));
 }
開發者ID:FAVHYAN,項目名稱:a3workout,代碼行數:7,代碼來源:streaming.php

示例5:

 function __construct()
 {
     parent::__construct();
     //        echo 'test';
     //make sure we're not always behind ssl
     remove_ssl();
 }
開發者ID:devarj,項目名稱:design,代碼行數:7,代碼來源:searchwidget.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('clients_model');
     $this->load->model('clients_pembiayaan_model');
     $this->load->library('pagination');
 }
開發者ID:ibnoe,項目名稱:core-mis,代碼行數:7,代碼來源:creditscoring.php

示例7:

 function __construct()
 {
     parent::__construct();
     $this->load->model('front/book_m');
     $this->load->helper('file');
     $this->table = 'book_torrent';
 }
開發者ID:NingerJohn,項目名稱:vfinder,代碼行數:7,代碼來源:book.php

示例8:

 function __construct()
 {
     parent::__construct();
     $this->load->model("role_model", "role");
     $this->load->model("privilege_model", "privilege");
     $this->load->library('form_validation');
 }
開發者ID:hisery,項目名稱:Lepus-1,代碼行數:7,代碼來源:role.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('user_m');
     $this->load->model('topic_m');
     $this->load->model('comment_m');
 }
開發者ID:phpox,項目名稱:LetsBBS,代碼行數:7,代碼來源:member.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     // Load helpers.
     $this->load->helper('xml');
     $this->load->helper('text');
 }
開發者ID:Ragash,項目名稱:DoveForums,代碼行數:7,代碼來源:Categories.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('news_model');
     $this->load->helper('news');
     $this->lang->load('news');
 }
開發者ID:remailednet,項目名稱:Bonfire-News,代碼行數:7,代碼來源:news.php

示例12:

 function __construct()
 {
     parent::__construct();
     force_ssl();
     $this->load->model(array('location_model'));
     $this->customer = $this->go_cart->customer();
 }
開發者ID:Joncg,項目名稱:eelly_cps_fx,代碼行數:7,代碼來源:secure.php

示例13: redirect

 function __construct()
 {
     parent::__construct();
     force_ssl();
     /* make sure the cart isnt empty */
     if ($this->go_cart->total_items() == 0) {
         redirect('cart/view_cart');
     }
     /* is the user required to be logged in? */
     if (config_item('require_login')) {
         $this->Customer_model->is_logged_in('checkout');
     }
     if (!config_item('allow_os_purchase') && config_item('inventory_enabled')) {
         /* double check the inventory of each item before proceeding to checkout */
         $inventory_check = $this->go_cart->check_inventory();
         if ($inventory_check) {
             /*
              OOPS we have an error. someone else has gotten the scoop on our customer and bought products out from under them!
              we need to redirect them to the view cart page and let them know that the inventory is no longer there.
             */
             $this->session->set_flashdata('error', $inventory_check);
             redirect('cart/view_cart');
         }
     }
     $this->load->library('form_validation');
 }
開發者ID:devarj,項目名稱:design,代碼行數:26,代碼來源:checkout.php

示例14: __construct

 /**
  * Constructor
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model('botanicules/botanicules_model');
     $this->lang->load('botanicules');
     Assets::add_module_js('botanicules', 'botanicules.js');
 }
開發者ID:brkrishna,項目名稱:freelance,代碼行數:12,代碼來源:botanicules.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     log_message('debug', 'Users Controller Initialized');
     $this->load->model('users_model');
     $this->load->helper(array('cookie', 'form', 'date', 'html'));
 }
開發者ID:68kb,項目名稱:68kb,代碼行數:7,代碼來源:users.php


注:本文中的Front_Controller::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。