本文整理汇总了PHP中Modules::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::load方法的具体用法?PHP Modules::load怎么用?PHP Modules::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules
的用法示例。
在下文中一共展示了Modules::load方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Registration Controller for Auth purpose
*
* Maps to the following URL
* http://example.com/index.php/registration
* - or -
* http://example.com/index.php/registration/index
*/
function __construct()
{
parent::__construct();
$this->load->library('notice');
$this->load->library('form_validation');
// loading form_validation library
Enqueue::enqueue_css('bootstrap.min');
Enqueue::enqueue_css('AdminLTE.min');
Enqueue::enqueue_css('skins/_all-skins.min');
/**
* Enqueueing Js
**/
Enqueue::enqueue_js('plugins/jQuery/jQuery-2.1.4.min');
Enqueue::enqueue_js('bootstrap.min');
Enqueue::enqueue_js('plugins/iCheck/icheck.min');
Enqueue::enqueue_js('app.min');
Modules::load(MODULESPATH);
}
示例2: module
/** Load a module controller **/
public function module($module, $params = NULL)
{
if (is_array($module)) {
return $this->modules($module);
}
$_alias = strtolower(end(explode('/', $module)));
CI::$APP->{$_alias} = Modules::load(array($module => $params));
return CI::$APP->{$_alias};
}
示例3: module
/** Load a module controller * */
public function module($module, $params = NULL)
{
if (is_array($module)) {
return $this->modules($module);
}
$_alias = strtolower(basename($module));
CI::$APP->{$_alias} = Modules::load(array($module => $params));
return $this;
}
示例4: module
/** Load a module controller **/
public function module($module, $params = NULL)
{
if (is_array($module)) {
return $this->modules($module);
}
$_alias = strtolower(basename($module));
CI::$APP->{$_alias} = Modules::load(array($module => $params));
// Modified by Ivan Tcholakov, 12-DEC-2013.
// See https://github.com/EllisLab/CodeIgniter/issues/2165
//return CI::$APP->$_alias;
return $this;
//
}
示例5: __construct
function __construct()
{
parent::__construct();
// Include default library class
include_once LIBPATH . '/Html.php';
include_once LIBPATH . '/Enqueue.php';
include_once LIBPATH . '/Modules.php';
include_once LIBPATH . '/UI.php';
include_once LIBPATH . '/SimpleFileManager.php';
// get system lang
$this->lang->load('system');
// Load Modules
Modules::load(MODULESPATH);
// if is installed, setup is always loaded
if ($this->setup->is_installed()) {
/**
* Load Session, Database and Options
**/
$this->load->library('session');
$this->load->database();
$this->load->model('options');
// internal config
$this->events->add_action('after_app_init', array($this, 'loader'), 2);
// Get Active Modules and load it
Modules::init('actives');
$this->events->do_action('after_app_init');
} else {
if ($this->uri->segment(1) === 'tendoo-setup' && $this->uri->segment(2) === 'database') {
$this->events->add_action('before_setting_tables', function () {
// this hook let modules being called during tendoo installation
// Only when site name is being defined
Modules::init('all');
});
}
}
// if is reserved controllers only
if (in_array($this->uri->segment(1), $this->config->item('reserved_controllers'))) {
$this->load->library('notice');
}
// Checks system status
if (in_array($this->uri->segment(1), $this->config->item('reserved_controllers')) || $this->uri->segment(1) === null) {
// there are some section which need tendoo to be installed. Before getting there, tendoo controller checks if for those
// section tendoo is installed. If segment(1) returns null, it means the current section is index. Even for index,
// installation is required
if ((in_array($this->uri->segment(1), $this->config->item('controllers_requiring_installation')) || $this->uri->segment(1) === null) && !$this->setup->is_installed()) {
redirect(array('tendoo-setup'));
}
// force user to be connected for certain controller
if (in_array($this->uri->segment(1), $this->config->item('controllers_requiring_logout')) && $this->setup->is_installed()) {
$this->events->do_action('is_connected');
}
// loading assets for reserved controller
Enqueue::enqueue_css('bootstrap.min');
Enqueue::enqueue_css('AdminLTE.min');
Enqueue::enqueue_css('skins/_all-skins.min');
Enqueue::enqueue_css('font-awesome-4.3.0');
Enqueue::enqueue_css('../plugins/iCheck/square/blue');
/**
* Enqueueing Js
**/
Enqueue::enqueue_js('../plugins/jQuery/jQuery-2.1.4.min');
Enqueue::enqueue_js('bootstrap.min');
Enqueue::enqueue_js('../plugins/iCheck/icheck.min');
Enqueue::enqueue_js('app.min');
}
}
示例6: strtotime
$cfg['etc'][$item->module][$item->name] = strtotime($item->value);
if ((int) $item->assign) {
TPL::add(strtoupper($item->name), formatDateTime($cfg['etc'][$item->module][$item->name]));
}
break;
default:
$cfg['etc'][$item->module][$item->name] = $item->value;
if ((int) $item->assign) {
TPL::add(strtoupper($item->name), $cfg['etc'][$item->module][$item->name]);
}
break;
}
}
}
// Configure the template system
if (defined('TEMPLATE_DIRPATH')) {
TPL::$dirpath = TEMPLATE_DIRPATH;
} else {
TPL::$dirpath = './styles/' . $cfg['etc']['core']['site_style'] . '/';
}
// Init the language system
if (defined('IN_SYS') && IN_SYS) {
Langs::$dirpath = './langs/' . $cfg['etc']['core']['site_lang'] . '/';
} else {
Langs::$dirpath = './langs/' . $cfg['etc']['core']['acp_lang'] . '/';
}
define('SITE_ROOT_PATH', $cfg['etc']['core']['SITE_ROOT_PATH']);
TPL::add('HTTP_REFERER', $_SERVER['HTTP_REFERER']);
// Init the modules
Modules::load();
示例7: module
/** Load a module controller **/
public function module($module, $params = NULL)
{
if (is_array($module)) {
return self::modules($module);
}
$controller = strtolower(end(explode('/', $module)));
$this->{$controller} = Modules::load(array($module => $params));
return $this->{$controller};
}