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


PHP CI_Loader::database方法代码示例

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


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

示例1: redirect

 function BE_Controller()
 {
     $this->page_path = false;
     global $active_controller;
     global $active_show;
     $active_controller = $this;
     parent::__construct();
     $this->load->helper("url");
     if (!$this->is_installed() && $this->uri->segment(2) != "install" && $this->uri->segment(1) != "api") {
         redirect('/admin/install/index', 'location');
     }
     if ($this->is_installed()) {
         $this->load->database();
         @$this->load->library('datamapper');
     }
     if (!$active_show) {
         $this->show = new Show($this);
     } else {
         $this->show =& $active_show;
     }
     $this->load->model('BuilderEngine');
     $this->load->model('users');
     if ($this->is_installed()) {
         $this->load->model('user');
         global $cache;
         $this->load->model("cache");
         $cache = $this->cache;
         $this->BuilderEngine->load_settings();
         if (!EventManager::is_initialized() && !EventManager::is_initializing()) {
             EventManager::set_initializing(true);
             $this->load->model('module');
             $modules = $this->module;
             // $modules = new Module();
             foreach ($modules->get() as $module) {
                 if ($module->folder == "module_system") {
                     continue;
                 }
                 Modules::run($module->folder . "/register_events");
             }
             EventManager::set_initialized(true);
         }
         if (self::$s_user == null) {
             self::$s_user = new User();
             $session = $this->session;
             self::$s_user->_init($session);
         }
         $user_model = $this->users;
         global $user;
         $user = self::$s_user;
         $this->user =& self::$s_user;
         $CI =& get_instance();
         $this->load->model('links');
         $this->links_array = $this->links->get();
         foreach ($this->links_array as $link) {
             $link->target = str_replace("%site_root%", home_url('/'), $link->target);
         }
     }
     $this->BuilderEngine->set_option("active_backend_theme", "dashboard", false);
     $this->load->library('module_parser');
     $this->load->library('parser');
     //$this->BuilderEngine->activate_theme("default");
     //echo $this->get_page_path();
     $this->load->module("layout_system");
     $this->layout_system->load->model("blocks");
     $this->layout_system->load->model('versions');
     $this->versions =& $this->layout_system->versions;
     if ($this->is_installed()) {
         $this->load->model('Module');
         $this->load->model('Group');
         $this->load->model('Group_module_permission');
     }
 }
开发者ID:hyrmedia,项目名称:builderengine,代码行数:72,代码来源:BE_Controller.php


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