本文整理汇总了PHP中CI_Loader类的典型用法代码示例。如果您正苦于以下问题:PHP CI_Loader类的具体用法?PHP CI_Loader怎么用?PHP CI_Loader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CI_Loader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: CI_Base
function CI_Base()
{
// This allows syntax like $this->load->foo() to work
parent::CI_Loader();
$this->load =& $this;
// This allows resources used within controller constructors to work
global $OBJ;
$OBJ = $this->load;
// Do NOT use a reference.
}
开发者ID:laiello,项目名称:php-personal-budget,代码行数:10,代码来源:Base4.php
示例8: init
/**
* Initialize both database and forge components
*/
public static function init($driver)
{
if (empty(self::$db) && empty(self::$forge)) {
// E_DEPRECATED notices thrown by mysql_connect(), mysql_pconnect()
// on PHP 5.5+ cause the tests to fail
if ($driver === 'mysql' && version_compare(PHP_VERSION, '5.5', '>=')) {
error_reporting(E_ALL & ~E_DEPRECATED);
}
$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');
self::$db = $db;
self::$forge = $forge;
self::$driver = $driver;
}
return self::$db;
}
开发者ID:wangkilin,项目名称:mywork,代码行数:24,代码来源:skeleton.php
示例9: MY_Loader
/**
* Constructor
*
* Sets the path to the view files and gets the initial output buffering level
*
* @access public
*/
function MY_Loader()
{
// {{{ Matchbox
$this->_matchbox =& load_class('Matchbox');
$this->_ci_tables = array();
parent::CI_Loader();
// }}}
$this->_ci_is_php5 = floor(phpversion()) >= 5 ? TRUE : FALSE;
$this->_ci_view_path = APPPATH . 'views/';
$this->_ci_ob_level = ob_get_level();
log_message('debug', "Loader Class Initialized");
}
开发者ID:GothamGazette,项目名称:Maze,代码行数:19,代码来源:MY_Loader.php
示例10: 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
示例11: __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
示例12: 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
示例13: __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
示例14: __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
示例15: 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
示例16: 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
示例17: __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
示例18: define
function __construct()
{
if (!defined('SPARKPATH')) {
define('SPARKPATH', 'sparks/');
}
$this->_ci_events_paths = array(APPPATH);
parent::__construct();
}
开发者ID:sherdog,项目名称:wntools,代码行数:8,代码来源:MY_Loader.php
示例19: initialize
/**
* To accomodate CI 2.1.0, we override the initialize() method instead of
* the ci_autoloader() method. Once sparks is integrated into CI, we
* can avoid the awkward version-specific logic.
* @return Loader
*/
function initialize()
{
parent::initialize();
if (!$this->_is_lt_210) {
$this->ci_autoloader();
}
return $this;
}
开发者ID:baldji,项目名称:CodeIgniter-Tutorial,代码行数:14,代码来源:MY_Loader.php
示例20: __construct
public function __construct()
{
parent::__construct();
# -- Loading libraries, helpers and modules from SHAREDPATH
$this->_ci_library_paths = array(SHAREDPATH, BASEPATH);
$this->_ci_helper_paths = array(SHAREDPATH, BASEPATH);
$this->_ci_model_paths = array(SHAREDPATH);
}
开发者ID:aidou-com,项目名称:CodeIgniter-Multi-Apps,代码行数:8,代码来源:MY_Loader.php
注:本文中的CI_Loader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论