本文整理汇总了PHP中Gekosale\App::setRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP App::setRequest方法的具体用法?PHP App::setRequest怎么用?PHP App::setRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gekosale\App
的用法示例。
在下文中一共展示了App::setRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Do some basic application inits
*/
public static function init()
{
if (!@(include_once ROOTPATH . 'config' . DS . 'settings.php')) {
App::setRequest();
App::setUrl();
include ROOTPATH . 'includes' . DS . 'install.php';
die;
}
self::$registry = new Registry();
@(include_once ROOTPATH . 'config' . DS . 'settings.php');
self::$config = $Settings;
if (empty(self::$config)) {
App::setRequest();
App::setUrl();
self::$registry->cache = new Cache(new Cache\File());
self::$registry->router = new Router(self::$registry);
self::$registry->loader = new Loader(self::$registry, false);
} else {
if (!self::isCli()) {
App::setRequest();
DEFINE('SSLNAME', isset(self::$config['ssl']) && self::$config['ssl'] == 1 ? 'https' : 'http');
DEFINE('__ADMINPANE__', self::$config['admin_panel_link']);
App::setUrl();
}
if (!empty(self::$config['memcache']) && self::$config['memcache']['active'] == 1) {
self::$registry->cache = new Cache(new Cache\Memcache(self::$config['memcache']));
} else {
self::$registry->cache = new Cache(new Cache\File());
}
self::$registry->router = new Router(self::$registry);
if (!self::isCli()) {
self::$registry->session = new Session(self::$registry);
}
self::$registry->loader = new Loader(self::$registry);
if (!self::isCli()) {
Session::setActiveEncryptionKeyValue((string) self::$config['client_data_encription_string']);
}
self::$registry->core = new Core(self::$registry);
Translation::loadTranslations();
App::getModel('csrfprotection');
}
}