本文整理汇总了PHP中ipsRegistry::settings方法的典型用法代码示例。如果您正苦于以下问题:PHP ipsRegistry::settings方法的具体用法?PHP ipsRegistry::settings怎么用?PHP ipsRegistry::settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ipsRegistry
的用法示例。
在下文中一共展示了ipsRegistry::settings方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @return @e 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
//-----------------------------------------
$KNOWN_NAMES = array();
require IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_known_names.php';
/*noLibHook*/
$this->known_names = $KNOWN_NAMES;
}
示例2: __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();
}
示例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: init
/**
* Initiate the registry
*
* @return mixed false or void
*/
public static function init()
{
$INFO = array();
$_ipsPowerSettings = array();
if (self::$initiated === TRUE) {
return FALSE;
}
self::$initiated = TRUE;
/* Load static classes */
require IPS_ROOT_PATH . "sources/base/core.php";
/*noLibHook*/
require IPS_ROOT_PATH . "sources/base/ipsMember.php";
/*noLibHook*/
/* Debugging notices? */
if (defined('IPS_ERROR_CAPTURE') and IPS_ERROR_CAPTURE !== FALSE) {
@error_reporting(E_ALL | E_NOTICE);
@set_error_handler("IPSDebug::errorHandler");
}
/* Load core variables */
self::_loadCoreVariables();
/* Load config file */
if (is_file(DOC_IPS_ROOT_PATH . 'conf_global.php')) {
require DOC_IPS_ROOT_PATH . 'conf_global.php';
/*noLibHook*/
if (is_array($INFO)) {
foreach ($INFO as $key => $val) {
ipsRegistry::$settings[$key] = str_replace('\', '\\', $val);
}
}
}
/* Load secret sauce */
if (is_array($_ipsPowerSettings)) {
ipsRegistry::$settings = array_merge($_ipsPowerSettings, ipsRegistry::$settings);
}
/* Make sure we're installed */
if (empty($INFO['sql_database'])) {
/* Quick PHP version check */
if (!version_compare(MIN_PHP_VERS, PHP_VERSION, '<=')) {
print "You must be using PHP " . MIN_PHP_VERS . " or better. You are currently using: " . PHP_VERSION;
exit;
}
$host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : @getenv('HTTP_HOST');
$self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : @getenv('PHP_SELF');
if (IPS_AREA == 'admin') {
@header("Location: http://" . $host . rtrim(dirname($self), '/\\') . "/install/index.php");
} else {
if (!defined('CP_DIRECTORY')) {
define('CP_DIRECTORY', 'admin');
}
@header("Location: http://" . $host . rtrim(dirname($self), '/\\') . "/" . CP_DIRECTORY . "/install/index.php");
}
}
/* Switch off dev mode you idjit */
if (!defined('IN_DEV')) {
define('IN_DEV', 0);
}
/* Shell defined? */
if (!defined('IPS_IS_SHELL')) {
define('IPS_IS_SHELL', FALSE);
}
/* If this wasn't defined in the gateway file... */
if (!defined('ALLOW_FURLS')) {
define('ALLOW_FURLS', ipsRegistry::$settings['use_friendly_urls'] ? TRUE : FALSE);
}
if (!defined('IPS_IS_MOBILE_APP')) {
define('IPS_IS_MOBILE_APP', false);
}
/**
* File and folder permissions
*/
if (!defined('IPS_FILE_PERMISSION')) {
define('IPS_FILE_PERMISSION', 0777);
}
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);
}
}
}
//.........这里部分代码省略.........