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


PHP CI_Base::CI_Base方法代碼示例

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


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

示例1: Controller

 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     // Assign all the class objects that were instantiated by the
     // bootstrap file (CodeIgniter.php) to local class variables
     // so that CI can run as one big super object.
     foreach (is_loaded() as $var => $class) {
         $this->{$var} =& load_class($class);
     }
     // In PHP 5 the Loader class is run as a discreet
     // class.  In PHP 4 it extends the Controller @PHP4
     if (is_php('5.0.0') == TRUE) {
         $this->load =& load_class('Loader', 'core');
         $this->load->_base_classes =& is_loaded();
         $this->load->_ci_autoloader();
     } else {
         $this->_ci_autoloader();
         // sync up the objects since PHP4 was working from a copy
         foreach (array_keys(get_object_vars($this)) as $attribute) {
             if (is_object($this->{$attribute})) {
                 $this->load->{$attribute} =& $this->{$attribute};
             }
         }
     }
     log_message('debug', "Controller Class Initialized");
 }
開發者ID:unisexx,項目名稱:adf16,代碼行數:31,代碼來源:Controller.php

示例2: Controller

 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     $this->_ci_initialize();
     log_message('debug', "Controller Class Initialized");
     $this->meta = array('user_id' => (int) $this->session->userdata('user_id') ?: 0, 'username' => $this->session->userdata('username') ?: 'guest', 'session_id' => $this->session->userdata('session_id'), 'hide_enemy_posts' => $this->session->userdata('hide_enemy_posts'), 'comments_shown' => (int) $this->session->userdata('comments_shown') ?: 50, 'threads_shown' => (int) $this->session->userdata('comments_shown') ?: 50, 'view_html' => (bool) $this->session->userdata('view_html') ?: TRUE);
 }
開發者ID:neosin,項目名稱:seaforium,代碼行數:12,代碼來源:Controller.php

示例3: Controller

 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     $this->_ci_initialize();
     $this->load->library('session');
     log_message('debug', "Controller Class Initialized");
 }
開發者ID:admire93,項目名稱:play,代碼行數:12,代碼來源:Controller.php

示例4: Controller

 /**
  * Constructor
  *
  * Loads the base classes needed to run CI, and runs the "autoload"
  * routinewhich loads the systems specifiedin the "autoload" config file.
  */
 function Controller()
 {
     parent::CI_Base();
     // Assign all the class objects that were instantiated by the
     // front controller to local class variables so that CI can be
     // run as one big super object.
     $this->_ci_assign_core();
     // Load everything specified in the autoload.php file
     $this->load->_ci_autoloader($this->_ci_autoload());
     // This allows anything loaded using $this->load (viwes, files, etc.)
     // to become accessible from within the Controller class functions.
     foreach ($this->ci_is_loaded as $val) {
         $this->load->{$val} =& $this->{$val};
     }
     log_message('debug', "Controller Class Initialized");
 }
開發者ID:Calico90,項目名稱:codeigniter-version-scan,代碼行數:22,代碼來源:Controller.php


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