本文整理匯總了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> */
}