本文整理汇总了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');
}
}