本文整理汇总了PHP中WikiFactory::DBToId方法的典型用法代码示例。如果您正苦于以下问题:PHP WikiFactory::DBToId方法的具体用法?PHP WikiFactory::DBToId怎么用?PHP WikiFactory::DBToId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WikiFactory
的用法示例。
在下文中一共展示了WikiFactory::DBToId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wfIsDBLightMode
function wfIsDBLightMode()
{
global $wgExternalSharedDB;
$dbLightMode = WikiFactory::getVarValueByName('wgDBLightMode', WikiFactory::DBToId($wgExternalSharedDB));
return (bool) $dbLightMode;
}
示例2: wfGetDB
if ($count % 1000 == 0) {
echo "Processed " . (1000 + $count - $skip) . " wikis\n";
}
$count++;
$database = $row->Database;
// don't talk to the wikicities cluster or internal mysql tables
if (strstr($database, 'wikicities_') !== false) {
continue;
}
if (array_search($database, ['information_schema', 'mysql', 'tmp', 'logs', 'data']) !== false) {
continue;
}
try {
$wiki_db = wfGetDB(DB_SLAVE, [], $row->Database);
if (!$wiki_db->tableExists($table)) {
$wiki_id = WikiFactory::DBToId($row->Database);
if ($wiki_id != 0) {
$missing[$wiki_id] = $row->Database;
}
}
$wiki_db->close();
} catch (Exception $e) {
print_r($e);
continue;
}
}
print "Found " . count($missing) . " databases missing {$table}\n";
if ($details) {
print_r($missing);
}
if ($updates) {
示例3: newFromName
/**
* newFromName
*
* @access public
*
* @param String $dbname
*/
public function newFromName($dbname)
{
return new WikiStats(WikiFactory::DBToId($dbname));
}