本文整理汇总了PHP中CF_Authentication::setDebug方法的典型用法代码示例。如果您正苦于以下问题:PHP CF_Authentication::setDebug方法的具体用法?PHP CF_Authentication::setDebug怎么用?PHP CF_Authentication::setDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CF_Authentication
的用法示例。
在下文中一共展示了CF_Authentication::setDebug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @see FileBackendStore::__construct()
* Additional $config params include:
* swiftAuthUrl : Swift authentication server URL
* swiftUser : Swift user used by MediaWiki (account:username)
* swiftKey : Swift authentication key for the above user
* swiftAuthTTL : Swift authentication TTL (seconds)
* swiftAnonUser : Swift user used for end-user requests (account:username)
* shardViaHashLevels : Map of container names to sharding config with:
* 'base' : base of hash characters, 16 or 36
* 'levels' : the number of hash levels (and digits)
* 'repeat' : hash subdirectories are prefixed with all the
* parent hash directory names (e.g. "a/ab/abc")
* swiftTimeout : number of seconds timeout consistent with php-cloudfiles. Default: 10
*/
public function __construct(array $config)
{
parent::__construct($config);
// Required settings
$this->auth = new CF_Authentication($config['swiftUser'], $config['swiftKey'], null, $config['swiftAuthUrl']);
/* <Wikia> */
if (!empty($config['debug'])) {
$this->auth->setDebug($config['debug']);
}
$this->swiftTimeout = isset($config['swiftTimeout']) ? intval($config['swiftTimeout']) : 10;
/* </Wikia> */
// Optional settings
$this->authTTL = isset($config['swiftAuthTTL']) ? $config['swiftAuthTTL'] : 120;
// some sane number
$this->swiftAnonUser = isset($config['swiftAnonUser']) ? $config['swiftAnonUser'] : '';
$this->shardViaHashLevels = isset($config['shardViaHashLevels']) ? $config['shardViaHashLevels'] : '';
/* <Wikia> */
// caching credentials
if (!empty($config['cacheAuthInfo']) && $config['cacheAuthInfo'] === true) {
$this->srvCache = wfGetMainCache();
}
$this->srvCache = $this->srvCache ? $this->srvCache : new EmptyBagOStuff();
/* </Wikia> */
}