本文整理汇总了PHP中Loader::core方法的典型用法代码示例。如果您正苦于以下问题:PHP Loader::core方法的具体用法?PHP Loader::core怎么用?PHP Loader::core使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::core方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: controller
private function controller()
{
Loader::core('Controller');
self::$router->routers = $c = self::$router->parse_url();
//var_dump(self::$router->routers);
Loader::controller(ucfirst(strtolower($c['controller'])), $c['method'], $c['var']);
}
示例2: init
public static function init()
{
if (Config::config('cache') == true) {
$config = Config::cache();
Loader::core('CacheCarry');
Loader::driver('caches', $config['driver']);
self::$cache = new $config['driver']($config);
}
}
示例3: exit
<?php
if (!defined('__ROOT__')) {
exit('Sorry,Please from entry!');
}
/**
* Created by PhpStorm.
* User: PGF
* Date: 2015/7/15
* Time: 17:25
* 将SESSION存到缓存中 实现多种SESSION方式 具体实现方式参考配置
* 选择memcache缓存时session将设置不上去,原因不明
*/
Loader::core('Session');
class cacheSession extends Session
{
protected $savePath;
//====打开
public function _open()
{
if (Config::session('savePath') == '') {
$config = array('savePath' => 'session');
Config::set($config, 'session', 1);
}
$this->savePath = Config::session('savePath');
Cache::delete_timeout('session');
return true;
}
//====关闭
public function _close()
{
示例4: exit
<?php
if (!defined('__ROOT__')) {
exit('Sorry,Please from entry!');
}
/**
* init 入口引入文件
* 项目自动初始化文件
* 创建时间:2014-08-08 14:56 PGF
*/
Loader::core('Debug');
//加载DEBUG类
Debug::start();
//程序开始
Loader::func('Base');
//加载基础全局函数
Loader::core('Cache');
//加载缓存处理类
Cache::init();
//初始化缓存类
//向日志中添加已经加载的Loader
Debug::add(__ROOT__ . Config::config('core_dir') . '/bases/' . 'Loader.class.php', 1);
Loader::core('Router');
//加载Router
Router::run();
//Router运行
Debug::stop();
//程序结束
//==================== END Initialize.php ========================//
示例5: Loader
//Appel des classes de base
include_class('./neofrag/classes/neofrag.php');
include_class('./neofrag/classes/library.php');
include_class('./neofrag/classes/translatable.php');
include_class('./neofrag/classes/controller.php');
include_class('./neofrag/classes/controller_module.php');
include_class('./neofrag/classes/controller_widget.php');
include_class('./neofrag/classes/core.php');
include_class('./neofrag/classes/zone.php');
include_class('./neofrag/classes/row.php');
include_class('./neofrag/classes/col.php');
include_class('./neofrag/classes/panel.php');
include_class('./neofrag/classes/panel_box.php');
include_class('./neofrag/classes/button_back.php');
include_class('./neofrag/classes/driver.php');
include_class('./neofrag/classes/model.php');
include_class('./neofrag/classes/module.php');
include_class('./neofrag/classes/theme.php');
include_class('./neofrag/classes/widget.php');
include_class('./neofrag/classes/widget_view.php');
//Appel de la librairie Loader
include_class('./neofrag/core/loader.php');
//Création du loader de base
$NeoFrag = new Loader(array('assets' => array('./assets', './overrides/themes/default', './neofrag/themes/default'), 'config' => array('./neofrag/config', './overrides/config', './config'), 'core' => array('./overrides/core', './neofrag/core'), 'helpers' => array('./overrides/helpers', './neofrag/helpers'), 'lang' => array('./overrides/lang', './neofrag/lang'), 'libraries' => array('./overrides/libraries', './neofrag/libraries'), 'modules' => array('./overrides/modules', './neofrag/modules', './modules'), 'themes' => array('./overrides/themes', './neofrag/themes', './themes'), 'views' => array('./overrides/themes/default/views', './neofrag/themes/default/views'), 'widgets' => array('./overrides/widgets', './neofrag/widgets', './widgets')));
NeoFrag::loader();
//Chargement des librairies
$NeoFrag->core('error', 'template', 'profiler', 'database', 'config', 'access', 'addons', 'session', 'user', 'groups', 'breadcrumb', 'router', 'output');
/*
NeoFrag Alpha 0.1.3
./index.php
*/
示例6: baseURL
/**
*
* @param string $url Default is NULL
* @return strıng
*/
function baseURL($url = NULL)
{
// load config core if has not loaded before
Loader::core('Config');
if ($url !== NULL) {
$baseURL = Config::get('baseURL');
if ($baseURL) {
return rtrim(Config::get('baseURL'), '/') . '/' . ltrim($url, '/');
} else {
return ltrim($url);
}
} else {
return Config::get('baseURL');
}
}