當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CI_Loader類代碼示例

本文整理匯總了PHP中CI_Loader的典型用法代碼示例。如果您正苦於以下問題:PHP CI_Loader類的具體用法?PHP CI_Loader怎麽用?PHP CI_Loader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CI_Loader類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initUploadImage

/**
 * 提供按鈕的ID列表,初始化插件組件
 * @param array $buttonIds
 * @param string $uploadUrl
 * @param string $secType 選擇圖片類型(local:本地上傳,remote:遠程圖片,all:本地遠程圖片)
 * @param string $managerUrl 遠程圖片列表地址(遠程圖片列表json格式,具體格式參考模板文件)
 */
function initUploadImage($buttonIds = array(), $uploadUrl = '', $secType = 'local', $managerUrl = '')
{
    $data = array('buttonIds' => $buttonIds, 'uploadUrl' => $uploadUrl, 'secType' => $secType, 'managerUrl' => $managerUrl);
    $loader = new CI_Loader();
    $content = $loader->view('common/initUploadImage', $data, true);
    echo $content;
}
開發者ID:zhaojianhui129,項目名稱:rmp2016,代碼行數:14,代碼來源:initjs_helper.php

示例2: show_view

 function show_view($view, $vars = array(), $return = FALSE)
 {
     $load = new CI_Loader();
     $load->view("includes/header");
     $load->view($view, $vars, $return);
     $load->view("includes/footer");
 }
開發者ID:egemenozkan,項目名稱:cibs,代碼行數:7,代碼來源:view_helper.php

示例3: CI_Base

 function CI_Base()
 {
     global $OBJ;
     parent::CI_Loader();
     $this->load =& $this;
     $OBJ = $this->load;
 }
開發者ID:Calico90,項目名稱:codeigniter-version-scan,代碼行數:7,代碼來源:Base4.php

示例4: init

 /**
  * Initialize both database and forge components
  */
 public static function init($driver)
 {
     if (empty(static::$db) && empty(static::$forge)) {
         $config = Mock_Database_DB::config($driver);
         $connection = new Mock_Database_DB($config);
         $db = Mock_Database_DB::DB($connection->set_dsn($driver), TRUE);
         CI_TestCase::instance()->ci_instance_var('db', $db);
         $loader = new CI_Loader();
         $loader->dbforge();
         $forge = CI_TestCase::instance()->ci_instance_var('dbforge');
         static::$db = $db;
         static::$forge = $forge;
         static::$driver = $driver;
     }
     return static::$db;
 }
開發者ID:DavBfr,項目名稱:BlogMVC,代碼行數:19,代碼來源:skeleton.php

示例5: model

 /**
  * (non-PHPdoc)
  * @see CI_Loader::model()
  */
 public function model($model, $name = '', $db_conn = FALSE)
 {
     if (is_string($model) && $name == '') {
         $name = $model;
         $model = $model . '_model';
     }
     parent::model($model, $name, $db_conn);
 }
開發者ID:s2software,項目名稱:codeigniter-powerful-model,代碼行數:12,代碼來源:MY_Loader.php

示例6: printProActItem

/**
 * 打印題目數據
 * @param array $data
 */
function printProActItem($data)
{
    //操作類型(edit:編輯,check:查看,)
    $data['action'] = isset($data['action']) ? $data['action'] : 'edit';
    $loader = new CI_Loader();
    //上傳圖片配置
    if ($data['type'] == 6) {
        $data['uploadUrl'] = printUrl('Upload', 'uploadSave', array('dir' => 'image'));
        $data['extraParams'] = array('itemId' => $data['itemId'], 'proId' => $data['proId'], 'actId' => $data['actId'], 'type' => $data['type']);
    }
    //上傳附件配置
    if ($data['type'] == 7) {
        $data['uploadUrl'] = printUrl('Upload', 'uploadSave', array('dir' => 'settleFile'));
        $data['extraParams'] = array('itemId' => $data['itemId'], 'proId' => $data['proId'], 'actId' => $data['actId'], 'type' => $data['type']);
    }
    $content = $loader->view('ProActItem/actItem' . $data['type'], $data, true);
    echo $content;
}
開發者ID:zhaojianhui129,項目名稱:implement2016,代碼行數:22,代碼來源:initjs_helper.php

示例7: render_view

 public function render_view($view, $breadcrumbs, $data, $folder = 'admin', $js = [], $css = [], $return = false)
 {
     // Загружаем хэдер
     $page['footer'] = $this->load->view('_blocks/header', ['page_title' => lang('main_title'), 'custom_js' => $js, 'custom_css' => $css, 'menus' => $this->get_menus(), 'menu_item' => $this->menu_item, 'breadcrumbs' => $breadcrumbs], $return);
     // Загружаем шаблон страницы
     $page['body'] = $this->load->view($folder . '/' . $view, $data, $return);
     // Загружаем футер
     $page['footer'] = $this->load->view('_blocks/footer', [], $return);
     if ($return) {
         return implode('', $page);
     }
 }
開發者ID:Speennaker,項目名稱:cometogether,代碼行數:12,代碼來源:MY_base_controller.php

示例8: __construct

 /**
  * Check & Set URI resource to determine the side of application
  *
  */
 public function __construct()
 {
     parent::__construct();
     $uri =& load_class('URI', 'core');
     $admin = $uri->segment(1);
     $this->is_admin = $admin == 'administrator' || $admin == 'admin' ? true : false;
 }
開發者ID:NaszvadiG,項目名稱:bootigniter,代碼行數:11,代碼來源:AZ_Loader.php

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

示例10: __construct

 /**
  * Class constructor method
  */
 public function __construct()
 {
     parent::__construct();
     $this->config('loader', TRUE);
     $this->_initialize();
     log_message('info', __CLASS__ . ' Class Initialized');
 }
開發者ID:versalle88,項目名稱:CodeIgniter-Base-Loader,代碼行數:10,代碼來源:MY_Loader.php

示例11: __construct

 /**
  * Constructor
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->_ci_service_paths = array(APPPATH);
     $this->_ci_services = array();
     log_message('debug', "MY_Loader Class Initialized");
 }
開發者ID:snamper,項目名稱:CI_xiaoshuhaochi,代碼行數:12,代碼來源:My_Loader.php

示例12: view

 public function view($view, $vars = array(), $return = FALSE)
 {
     $CI =& get_instance();
     if (isset($CI->local)) {
         $file_exists = FALSE;
         $_ci_path = '';
         $_ci_view = $view . '__' . $CI->local['code'];
         $_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
         $_ci_file = $_ci_ext === '' ? $_ci_view . '.php' : $_ci_view;
         foreach ($this->_ci_view_paths as $_ci_view_file => $cascade) {
             if (file_exists($_ci_view_file . $_ci_file)) {
                 $_ci_path = $_ci_view_file . $_ci_file;
                 $file_exists = TRUE;
                 break;
             }
             if (!$cascade) {
                 break;
             }
         }
         if ($file_exists or file_exists($_ci_path)) {
             $view = $_ci_view;
         }
     }
     return parent::view($view, $vars, $return);
 }
開發者ID:aidou-com,項目名稱:pro-3,代碼行數:25,代碼來源:MY_Loader.php

示例13: define

 /**
  * Constructor. Define SPARKPATH if it doesn't exist, initialize parent
  */
 function __construct()
 {
     if (!defined('SPARKPATH')) {
         define('SPARKPATH', APPPATH . 'sparks/');
     }
     parent::__construct();
 }
開發者ID:jayalfredprufrock,項目名稱:codeigniter-boilerplate,代碼行數:10,代碼來源:MY_Loader.php

示例14: __construct

 public function __construct()
 {
     $this->_ci_library_paths = array(PATH_APP, PATH_APPS, PATH_SYSTEM);
     $this->_ci_helper_paths = array(PATH_APP, PATH_APPS, PATH_SYSTEM);
     $this->_ci_view_paths = array(VIEWPATH => TRUE, MODULES_DIR => TRUE);
     parent::__construct();
 }
開發者ID:skubbs-chuck,項目名稱:emr,代碼行數:7,代碼來源:MY_Loader.php

示例15: define

 function __construct()
 {
     if (!defined('SPARKPATH')) {
         define('SPARKPATH', 'sparks/');
     }
     $this->_ci_events_paths = array(APPPATH);
     parent::__construct();
 }
開發者ID:sherdog,項目名稱:wntools,代碼行數:8,代碼來源:MY_Loader.php


注:本文中的CI_Loader類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。