本文整理匯總了PHP中StatusNet::plugins方法的典型用法代碼示例。如果您正苦於以下問題:PHP StatusNet::plugins方法的具體用法?PHP StatusNet::plugins怎麽用?PHP StatusNet::plugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類StatusNet
的用法示例。
在下文中一共展示了StatusNet::plugins方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initDefaults
/**
* Establish default configuration based on given or default server and path
* Sets global $_server, $_path, and $config
*/
protected static function initDefaults($server, $path)
{
global $_server, $_path, $config;
Event::clearHandlers();
self::$plugins = array();
// try to figure out where we are. $server and $path
// can be set by including module, else we guess based
// on HTTP info.
if (isset($server)) {
$_server = $server;
} else {
$_server = array_key_exists('SERVER_NAME', $_SERVER) ? strtolower($_SERVER['SERVER_NAME']) : null;
}
if (isset($path)) {
$_path = $path;
} else {
$_path = array_key_exists('SERVER_NAME', $_SERVER) && array_key_exists('SCRIPT_NAME', $_SERVER) ? self::_sn_to_path($_SERVER['SCRIPT_NAME']) : null;
}
// Set config values initially to default values
$default = self::defaultConfig();
$config = $default;
// default configuration, overwritten in config.php
// Keep DB_DataObject's db config synced to ours...
$config['db'] =& PEAR::getStaticProperty('DB_DataObject', 'options');
$config['db'] = $default['db'];
// Backward compatibility
$config['site']['design'] =& $config['design'];
if (function_exists('date_default_timezone_set')) {
/* Work internally in UTC */
date_default_timezone_set('UTC');
}
}