本文整理汇总了PHP中ipsRegistry::request方法的典型用法代码示例。如果您正苦于以下问题:PHP ipsRegistry::request方法的具体用法?PHP ipsRegistry::request怎么用?PHP ipsRegistry::request使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ipsRegistry
的用法示例。
在下文中一共展示了ipsRegistry::request方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct(ipsRegistry $registry)
{
$this->DB = $registry->DB();
$this->settings = $registry->settings();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->request();
}
示例2: convertIncoming
/**
* Initialize ipsRegistry and this class
*
* @access protected
* @return @e void
*/
protected function convertIncoming()
{
# GET first
$input = $this->_recurse($_GET, array());
# Then overwrite with POST
ipsRegistry::$request = $this->_recurse($_POST, $input);
/* Reset $_GET and $_POST */
array_walk_recursive($_POST, create_function('&$value, $key', '$value = ipsMobileApp::convert($key, $value);'));
array_walk_recursive($_GET, create_function('&$value, $key', '$value = ipsMobileApp::convert($key, $value);'));
}
示例3: __construct
/**
* Setup registry objects
*
* @access public
* @param object ipsRegistry $registry
* @return void
*/
public function __construct(ipsRegistry $registry)
{
$this->DB = $registry->DB();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->settings = $registry->settings();
$this->request = $registry->request();
/* Do we have the sphinxes? */
if (!file_exists('sphinxapi.php')) {
$registry->output->showError('sphinx_api_missing', 10182);
}
/* Load Sphinx */
require 'sphinxapi.php';
$this->sphinxClient = new SphinxClient();
$this->sphinxClient->SetServer($this->settings['search_sphinx_server'], intval($this->settings['search_sphinx_port']));
$this->sphinxClient->SetMatchMode(SPH_MATCH_EXTENDED);
$this->sphinxClient->SetLimits(0, 1000);
/* We're going to need the regular app index plugin also */
require_once IPSLib::getAppDir(ipsRegistry::$request['search_app']) . '/extensions/searchPlugin.php';
$searchApp = 'search' . ucfirst($this->request['search_app']) . 'Plugin';
$this->appSearchPlugin = new $searchApp($registry);
}
示例4: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @return void
*/
public function __construct(ipsRegistry $registry)
{
//-----------------------------------------
// Make object references
//-----------------------------------------
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings = $registry->settings();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->request();
set_time_limit(0);
if (strpos(strtolower(PHP_OS), 'win') === 0) {
$this->dir_split = "\\";
}
//-----------------------------------------
// Known names
//-----------------------------------------
require IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_known_names.php';
$this->known_names = $KNOWN_NAMES;
}
示例5: init
//.........这里部分代码省略.........
}
if (!defined('IPS_FOLDER_PERMISSION')) {
define('IPS_FOLDER_PERMISSION', 0777);
}
/* Set it again incase a gateway turned it off */
ipsRegistry::$settings['use_friendly_urls'] = ALLOW_FURLS;
/* Start timer */
IPSDebug::startTimer();
/* Cookies... */
IPSCookie::$sensitive_cookies = array('session_id', 'admin_session_id', 'member_id', 'pass_hash');
/* INIT DB */
self::$handles['db'] = ips_DBRegistry::instance();
/* Set DB */
self::$handles['db']->setDB(ipsRegistry::$settings['sql_driver']);
/* Input set up... */
if (is_array($_POST) and count($_POST)) {
foreach ($_POST as $key => $value) {
# Skip post arrays
if (!is_array($value)) {
$_POST[$key] = IPSText::stripslashes($value);
}
}
}
//-----------------------------------------
// Clean globals, first.
//-----------------------------------------
IPSLib::cleanGlobals($_GET);
IPSLib::cleanGlobals($_POST);
IPSLib::cleanGlobals($_COOKIE);
IPSLib::cleanGlobals($_REQUEST);
# GET first
$input = IPSLib::parseIncomingRecursively($_GET, array());
# Then overwrite with POST
self::$request = IPSLib::parseIncomingRecursively($_POST, $input);
# Fix some notices
if (!isset(self::$request['module'])) {
self::$request['module'] = '';
}
if (!isset(self::$request['section'])) {
self::$request['section'] = '';
}
# Assign request method
self::$request['request_method'] = strtolower(my_getenv('REQUEST_METHOD'));
/* Define some constants */
define('IPS_IS_TASK', (isset(self::$request['module']) and self::$request['module'] == 'task' and self::$request['app'] == 'core') ? TRUE : FALSE);
define('IPS_IS_AJAX', (isset(self::$request['module']) and self::$request['module'] == 'ajax') ? TRUE : FALSE);
/* First pass of app set up. Needs to be BEFORE caches and member are set up */
self::_fUrlInit();
self::_manageIncomingURLs();
/* _manageIncomingURLs MUST be called first!!! */
self::_setUpAppData();
/* Load app / coreVariables.. must be called after app Data */
self::_loadAppCoreVariables(IPS_APP_COMPONENT);
/* Must be called after _manageIncomingURLs */
self::$handles['db']->getDB()->setDebugMode(IPS_SQL_DEBUG_MODE ? isset($_GET['debug']) ? intval($_GET['debug']) : 0 : 0);
/* Get caches */
self::$handles['caches'] = ips_CacheRegistry::instance();
/* Make sure all is well before we proceed */
try {
self::instance()->setUpSettings();
} catch (Exception $e) {
print file_get_contents(IPS_CACHE_PATH . 'cache/skin_cache/settingsEmpty.html');
exit;
}
/* Reset database log file paths to cache path */
self::$handles['db']->resetLogPaths();
示例6: init
/**
* Initiate the registry
*
* @access public
* @return @e void
*/
public static function init()
{
if (self::$initiated === TRUE) {
return FALSE;
}
self::$initiated = TRUE;
/* Log current upgrade step */
self::logUpgradeStep();
/* Load static classes */
require IPS_ROOT_PATH . "sources/base/core.php";
/*noLibHook*/
require IPS_ROOT_PATH . "sources/base/ipsMember.php";
/*noLibHook*/
require_once IPS_ROOT_PATH . "setup/sources/base/setup.php";
/*noLibHook*/
/* Load conf global and set up DB */
if (IPS_IS_UPGRADER) {
if (!is_file(DOC_IPS_ROOT_PATH . "conf_global.php")) {
print "Cannot locate: " . DOC_IPS_ROOT_PATH . "conf_global.php";
exit;
}
self::loadConfGlobal();
/* Got settings? */
if (!ipsRegistry::$settings['sql_driver']) {
print "Settings not loaded from: " . DOC_IPS_ROOT_PATH . "conf_global.php - did you mean to install?";
exit;
}
self::setDBHandle();
} else {
/* Ensure char set is defined */
if (!defined('IPS_DOC_CHAR_SET')) {
define('IPS_DOC_CHAR_SET', strtoupper(IPSSetUp::charSet));
}
if (!defined('IPS_CACHE_PATH')) {
define('IPS_CACHE_PATH', DOC_IPS_ROOT_PATH);
}
require IPS_ROOT_PATH . "setup/sources/base/install.php";
/*noLibHook*/
}
/* Input set up... */
if (is_array($_POST) and count($_POST)) {
foreach ($_POST as $key => $value) {
# Skip post arrays
if (!is_array($value)) {
$_POST[$key] = IPSText::stripslashes($value);
}
}
}
//-----------------------------------------
// Clean globals, first.
//-----------------------------------------
IPSLib::cleanGlobals($_GET);
IPSLib::cleanGlobals($_POST);
IPSLib::cleanGlobals($_COOKIE);
IPSLib::cleanGlobals($_REQUEST);
# GET first
$input = IPSLib::parseIncomingRecursively($_GET, array());
# Then overwrite with POST
self::$request = IPSLib::parseIncomingRecursively($_POST, $input);
# Assign request method
self::$request['request_method'] = strtolower(my_getenv('REQUEST_METHOD'));
self::_setUpAppData();
/* Make sure it's a string */
if (is_array(self::$request['section'])) {
self::$request['section'] = '';
}
/* Get caches */
self::$handles['caches'] = ips_CacheRegistry::instance();
if (IPS_IS_UPGRADER) {
/* Make sure all is well before we proceed */
self::instance()->setUpSettings();
/* Build module and application caches */
self::instance()->checkCaches();
/* Load 'legacy' systems */
$file = '';
if (IPSSetUp::is300plus() === TRUE) {
$file = '3xx.php';
} else {
if (IPSSetUp::is200plus() === TRUE) {
$file = '2xx.php';
} else {
$file = '1xx.php';
}
}
require_once IPS_ROOT_PATH . 'setup/sources/legacy/' . $file;
/*noLibHook*/
self::instance()->setClass('legacy', new upgradeLegacy(self::instance()));
}
/* Set up member */
self::$handles['member'] = ips_MemberRegistry::instance();
# Thaw saved data
IPSSetUp::thawSavedData();
/* Gather other classes */
require_once IPS_ROOT_PATH . 'setup/sources/classes/output/output.php';
//.........这里部分代码省略.........