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


PHP CI_Base::__construct方法代码示例

本文整理汇总了PHP中CI_Base::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Base::__construct方法的具体用法?PHP CI_Base::__construct怎么用?PHP CI_Base::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CI_Base的用法示例。


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     /* assign the core loader */
     $this->load = load_class('Loader');
     /* the core classes */
     $classes = array('config' => 'Config', 'input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'lang' => 'Language', 'router' => 'Router');
     /* assign the core classes */
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* autoload application items */
     $this->load->_ci_autoloader();
 }
开发者ID:kalroot,项目名称:celula-cms,代码行数:14,代码来源:Controller.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     /* assign the application instance */
     self::$APP = CI_Base::get_instance();
     /* assign the core classes */
     $classes = CI_VERSION < 2 ? array('config' => 'Config', 'input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'lang' => 'Language', 'router' => 'Router') : is_loaded();
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* assign the core loader */
     $this->load = load_class('Loader', 'core');
     /* autoload application items */
     $this->load->_ci_autoloader();
     /* re-assign language and config for modules */
     if (!is_a($this->lang, 'MX_Lang')) {
         $this->lang = new MX_Lang();
     }
     // if ( ! is_a($this->config, 'MX_Config')) $this->config = new MX_Config;
 }
开发者ID:unisexx,项目名称:adf16,代码行数:20,代码来源:Base.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     /* assign the application instance */
     self::$APP = CI_Base::get_instance();
     /* assign the core loader */
     $this->load = new CI_Loader();
     /* use modular config and language */
     $this->config = new MX_Config();
     $this->lang = new MX_Language();
     /* the core classes */
     $classes = array('input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'router' => 'Router');
     /* assign the core classes */
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* autoload application items */
     $this->load->_ci_autoloader();
     /* re-assign the core loader to use modules */
     $this->load = class_exists('MX_Loader', FALSE) ? new MX_Loader() : new Loader();
 }
开发者ID:RoverWire,项目名称:eventos-nacionales,代码行数:21,代码来源:Controller.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     /* assign the application instance */
     self::$APP = CI_Base::get_instance();
     /* assign the core classes */
     $classes = is_loaded();
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* assign the core loader */
     $this->load = load_class('Loader', 'core');
     /* re-assign language and config for modules */
     if (!is_a($this->lang, 'MX_Lang')) {
         $this->lang = new MX_Lang();
     }
     if (!is_a($this->config, 'MX_Config')) {
         $this->config = new MX_Config();
     }
     /* autoload application items */
     $this->load->_ci_autoloader();
 }
开发者ID:hqye,项目名称:stblog,代码行数:22,代码来源:Base.php

示例5: __construct

 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 public function __construct()
 {
     parent::__construct();
     $this->_ci_initialize();
     log_message('debug', 'Controller Class Initialized');
 }
开发者ID:shivercube,项目名称:kcPHP,代码行数:11,代码来源:Controller.php

示例6: Controller

 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::__construct();
     $this->_ci_initialize();
     log_message('debug', "Controller Class Initialized");
 }
开发者ID:carriercomm,项目名称:opengateway,代码行数:11,代码来源:Controller.php

示例7: _assign_libraries

 /** Assign core libraries **/
 private function _assign_libraries()
 {
     if ($core = end(modules::$registry)) {
         foreach (get_object_vars($core) as $key => $object) {
             if (is_object($object) and !isset($this->{$key})) {
                 $this->{$key} = $object;
             }
         }
     } else {
         /* the CI core classes */
         $classes = array('config' => 'Config', 'input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'lang' => 'Language', 'router' => 'Router');
         /* assign the classes */
         foreach ($classes as $key => $class) {
             $this->{$key} = load_class($class);
         }
         /* initialize CI_Base */
         CI_Base::__construct();
     }
 }
开发者ID:silentworks,项目名称:vaspasian,代码行数:20,代码来源:Controller.php


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