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


PHP CI_Base::get_instance方法代码示例

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


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

示例1: __construct

 /**
  * Constructor assign CI instance
  *
  * @return 	void
  */
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     $this->_ci->benchmark->mark('get_settings_start');
     $this->get_settings();
     $this->_ci->benchmark->mark('get_settings_end');
 }
开发者ID:68kb,项目名称:68kb,代码行数:12,代码来源:Settings.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     self::$APP = CI_Base::get_instance();
     self::$APP->config = new MX_Config();
     self::$APP->lang = new MX_Lang();
     $this->_module = self::$APP->router->fetch_module();
 }
开发者ID:8496tar,项目名称:pyrocms,代码行数:8,代码来源:MY_Loader.php

示例3: __construct

 /**
  * Constructor - Initializes and references CI
  */
 public function __construct()
 {
     log_message('debug', "Cache Class Initialized.");
     $this->_ci = CI_Base::get_instance();
     $this->_ci->load->library('settings/settings');
     $this->_reset();
     $this->_path = $this->_ci->config->item('cache_path');
     $this->_default_expires = $this->_ci->settings->get_setting('site_cache_time');
     if (!is_dir($this->_path)) {
         show_error("Cache Path not found: {$this->_path}");
     }
 }
开发者ID:68kb,项目名称:68kb,代码行数:15,代码来源:Cache.php

示例4: __construct

 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     if (!$this->_ci->config->item('migrations_enabled') or !$this->_ci->config->item('migrations_path')) {
         show_404();
     }
     // $this->_ci->lang->load("setup");
     $this->migrations_path = $this->_ci->config->item('migrations_path');
     if ($this->migrations_path != '' && substr($this->migrations_path, -1) != '/') {
         $this->migrations_path .= '/';
     }
     $this->_ci->load->dbforge();
 }
开发者ID:68kb,项目名称:68kb,代码行数:13,代码来源:Migrate.php

示例5: __construct

 public function __construct()
 {
     self::$APP = CI_Base::get_instance();
     /* assign the core loader */
     self::$APP->load = new MX_Loader();
     /* re-assign language and config for modules */
     if (!is_a(self::$APP->lang, 'MX_Lang')) {
         self::$APP->lang = new MX_Lang();
     }
     if (!is_a(self::$APP->config, 'MX_Config')) {
         self::$APP->config = new MX_Config();
     }
 }
开发者ID:hqye,项目名称:stblog,代码行数:13,代码来源:Ci.php

示例6: __construct

 /**
  * Construct
  *
  * Allow users to extend the system.
  * Idea from the now defunct Iono
  */
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     $this->_ci->benchmark->mark('add_ons_start');
     // Directory helper
     $this->_ci->load->helper('directory');
     // load any active modules first
     $this->_load_modules();
     // now auto load core helpers
     // by having this after the modules load it
     // allows people to extend helpers
     $this->_core_helpers();
     $this->_ci->benchmark->mark('add_ons_end');
 }
开发者ID:68kb,项目名称:68kb,代码行数:20,代码来源:Events.php

示例7: __construct

 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     log_message('debug', "User_lib Class Initialized");
     $this->_ci->benchmark->mark('users_lib_start');
     $this->_ci->load->library('session');
     $this->_ci->load->model('users/users_model');
     $this->_ci->load->helper('cookie');
     if ($this->logged_in()) {
         $this->user_data = $this->_ci->users_model->get_user($this->_ci->session->userdata('user_id'));
     } else {
         $this->user_data = $this->_set_guest();
     }
     $this->_ci->benchmark->mark('users_lib_end');
 }
开发者ID:68kb,项目名称:68kb,代码行数:15,代码来源:Users_auth.php

示例8: __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

示例9: __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

示例10: __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

示例11: __construct

 /**
  * Setup events
  *
  * @access	public
  */
 public function __construct($modules)
 {
     $this->_ci = CI_Base::get_instance();
     $modules->register('template/build', $this, 'debug_footer');
     $this->_ci->config->set_item('debug', TRUE);
 }
开发者ID:68kb,项目名称:68kb,代码行数:11,代码来源:debug_extension.php

示例12: getCI

 public function getCI()
 {
     if (empty($this->ci)) {
         $this->setCI(CI_Base::get_instance());
     }
     return $this->ci;
 }
开发者ID:HighTechTorres,项目名称:TwilioCookbook,代码行数:7,代码来源:Tester.class.php

示例13: __construct

 public function __construct()
 {
     parent::WebTestCase();
     $this->_ci = CI_Base::get_instance();
 }
开发者ID:68kb,项目名称:68kb,代码行数:5,代码来源:index.php

示例14: __construct

 /**
  * Setup events
  *
  * @access	public
  */
 public function __construct($modules)
 {
     $this->_ci = CI_Base::get_instance();
     //$this->_ci->load->language('comments/comments');
     $modules->register('admin/home', $this, 'latest_comments');
 }
开发者ID:68kb,项目名称:68kb,代码行数:11,代码来源:comments_extension.php

示例15: __construct

 /**
  * Constructor
  */
 function __construct()
 {
     log_message('debug', 'Categories Library Initialized');
     $this->_ci = CI_Base::get_instance();
 }
开发者ID:68kb,项目名称:68kb,代码行数:8,代码来源:Categories_library.php


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