当前位置: 首页>>代码示例>>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;未经允许,请勿转载。