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


PHP CI_Loader::library方法代码示例

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


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

示例1: showError

 function MY_Controller()
 {
     parent::Controller();
     //当前用户信息初始化
     $this->load->library('User', null, 'userLib');
     $userInfo = $this->userLib->getUserInfo();
     $this->user = $userInfo;
     if (!$this->user) {
         showError($this->userLib->error, '/');
     }
     /* if (in_array($this->user['userId'], array(694,3767,3868))) {
            showError('测试账号禁止进去正式地址');
        } */
     //加载菜单,全局使用
     $this->load->library('Navbar', $this->user);
     $this->navbarList = $this->navbar->getNavbarList();
     //公告内容
     $this->load->model('HelperNoticeModel');
     $this->viewData['noticeData'] = $this->HelperNoticeModel->getLatest($this->user['userRole']);
     if ($this->viewData['noticeData']) {
         $this->navbarList[] = array('Help', 'noticeCheck', 'title' => '公告');
     }
     //当前选中菜单默认为当前控制器
     $this->navbarFocus = $this->input->get('c');
     //当前默认选中的菜单项
     $this->navChildFocus = $this->input->get('c') . '_' . $this->input->get('m');
     //当前主题
     $this->theme = $this->config->item('theme');
     //加载认证类,全局可以调用
     $this->load->library('Auth', $this->user);
     //面包屑导航
     $this->viewData['breadcrumb'][] = array('url' => printUrl('Main', 'index'), 'title' => '首页');
     //加载时段模型
     $this->load->model('timeUnitModel');
 }
开发者ID:zhaojianhui129,项目名称:qirmp2016,代码行数:35,代码来源:MY_Controller.php

示例2: library

 /**
  * $this->load->library('security') is deprecated as the CI_Security
  * class has been moved to Core, so it is always loaded.  In order to ease
  * the transition for third-party developers, we are extending the CI
  * loader function to return NULL in the event a load function to Security
  * is called.
  */
 public function library($library = '', $params = NULL, $object_name = NULL)
 {
     if (is_array($library)) {
         foreach ($library as $read) {
             $this->library($read);
         }
         return;
     }
     // Security is always loaded
     if (strtolower($library) == 'security') {
         return NULL;
     }
     return parent::library($library, $params, $object_name);
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:21,代码来源:EE_Loader.php

示例3: showError

 function MY_Controller()
 {
     parent::Controller();
     $this->load->model('timeUnitModel');
     $this->load->library('User', null, 'userLib');
     $this->user = $this->userLib->getUserInfo();
     if (!$this->user) {
         showError($this->userLib->error, '/');
     }
     //加载菜单,全局使用
     $this->load->library('Navbar', $this->user);
     $this->navbarList = $this->navbar->getNavbarList();
     //当前选中菜单默认为当前控制器
     $this->navbarFocus = $_GET['c'] . '_' . $_GET['m'];
     //当前默认选中的菜单项
     $this->navChildFocus = $this->input->get('c') . '_' . $this->input->get('m');
     //当前主题
     $this->theme = $this->config->item('theme');
     //加载认证类,全局可以调用
     $this->load->library('Auth', $this->user);
     //面包屑导航
     $this->viewData['breadcrumb'][] = array('url' => printUrl('Main', 'index'), 'title' => '首页');
 }
开发者ID:zhaojianhui129,项目名称:implement2016,代码行数:23,代码来源:MY_Controller.php

示例4: library

 /**
  * $this->load->library('security') is deprecated as the CI_Security
  * class has been moved to Core, so it is always loaded.  In order to ease
  * the transition for third-party developers, we are extending the CI
  * loader function to return NULL in the event a load function to Security
  * is called.
  *
  * $this->load->library('security') is @deprecated, and this temporary
  * workaround will be removed in a future version
  */
 public function library($library = '', $params = NULL, $object_name = NULL)
 {
     if (is_array($library)) {
         foreach ($library as $read) {
             $this->library($read);
         }
         return;
     }
     if (strtolower($library) == 'security') {
         ee()->load->library('logger');
         ee()->logger->deprecated('2.6', 'The security library is always loaded.');
         return NULL;
     }
     return parent::library($library, $params, $object_name);
 }
开发者ID:nigelpeters,项目名称:css-recruitment-ee,代码行数:25,代码来源:EE_Loader.php

示例5: 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

示例6: library

 /**
  * Class Loader
  *
  * This function lets users load and instantiate classes.
  * It is designed to be called from a user's app controllers.
  *
  * @param	string	the name of the class
  * @param	mixed	the optional parameters
  * @param	string	an optional object name
  * @return	void
  */
 public function library($library = '', $params = NULL, $object_name = NULL)
 {
     if (is_array($library)) {
         foreach ($library as $class) {
             $this->library($class, $params);
         }
         return;
     }
     // Detect module
     if (list($module, $class) = $this->detect_module($library)) {
         // Module already loaded
         if (in_array($module, $this->_ci_modules)) {
             return parent::library($class, $params, $object_name);
         }
         // Add module
         $this->add_module($module);
         // Let parent do the heavy work
         $void = parent::library($class, $params, $object_name);
         // Remove module
         $this->remove_module();
         return $void;
     } else {
         return parent::library($library, $params, $object_name);
     }
 }
开发者ID:sastrylal,项目名称:tingting,代码行数:36,代码来源:Loader.php

示例7: library

    /**
     * $this->load->library('security') is deprecated as the CI_Security
     * class has been moved to Core, so it is always loaded.  In order to ease
     * the transition for third-party developers, we are extending the CI
     * loader function to return NULL in the event a load function to Security
     * is called.  
     *
     * $this->load->library('security') is @deprecated, and this temporary 
     * workaround will be removed in a future version
     */
    public function library($library = '', $params = NULL, $object_name = NULL)
    {
        if (is_array($library)) {
            foreach ($library as $read) {
                $this->library($read);
            }
            return;
        }
        if (strtolower($library) == 'security') {
            $this->library('logger');
            get_instance()->logger->developer('A third-party add-on is calling $this->load->library(\'security\'),
				which is deprecated as the CI_Security class has been moved to Core, so it is always loaded.', TRUE, 604800);
            return NULL;
        }
        return parent::library($library, $params, $object_name);
    }
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:26,代码来源:EE_Loader.php

示例8: library

 /**
  * {inheritdoc}
  */
 public function library($library = '', $params = null, $object_name = null)
 {
     if (is_array($library)) {
         foreach ($library as $key => $value) {
             if (is_int($key)) {
                 $this->library($value, $params);
             } else {
                 $this->library($key, $params, $value);
             }
         }
         return $this;
     }
     // Detect module
     if (list($module, $class) = $this->module->detect($library)) {
         // Module already loaded
         if (!$this->module->loaded($module)) {
             // Add module
             $this->module->add($this, $module);
         }
         // Let parent do the heavy work
         if (!($void = parent::library($class, $params, $object_name))) {
             // Remove module
             $this->module->remove($this);
         }
         return $void;
     }
     return parent::library($library, $params, $object_name);
 }
开发者ID:bootigniter,项目名称:project,代码行数:31,代码来源:Loader.php


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