本文整理汇总了PHP中Block::enumBlocks方法的典型用法代码示例。如果您正苦于以下问题:PHP Block::enumBlocks方法的具体用法?PHP Block::enumBlocks怎么用?PHP Block::enumBlocks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block
的用法示例。
在下文中一共展示了Block::enumBlocks方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadFromDB
/**
* Load the blocks from the database and save them to memcached
* @param bool $bFromSlave Whether to load data from slaves or master
*/
function loadFromDB($bFromSlave = false)
{
global $wgUseMemCached, $wgMemc;
$this->mData = array();
# Selecting FOR UPDATE is a convenient way to serialise the memcached and DB operations,
# which is necessary even though we don't update the DB
if (!$bFromSlave) {
Block::enumBlocks('wfBlockCacheInsert', '', EB_FOR_UPDATE);
#$wgMemc->set( $this->mMemcKey, $this->mData, 0 );
} else {
Block::enumBlocks('wfBlockCacheInsert', '');
}
}
示例2: showList
function showList($msg)
{
global $wgOut;
$wgOut->setPagetitle(wfMsg("ipblocklist"));
if ("" != $msg) {
$wgOut->setSubtitle($msg);
}
global $wgRequest;
list($this->limit, $this->offset) = $wgRequest->getLimitOffset();
$this->counter = 0;
$paging = '<p>' . wfViewPrevNext($this->offset, $this->limit, Title::makeTitle(NS_SPECIAL, 'Ipblocklist'), 'ip=' . urlencode($this->ip)) . "</p>\n";
$wgOut->addHTML($paging);
$search = $this->searchForm();
$wgOut->addHTML($search);
$wgOut->addHTML("<ul>");
if (!Block::enumBlocks(array(&$this, "addRow"), 0)) {
// FIXME hack to solve #bug 1487
$wgOut->addHTML('<li>' . wfMsgHtml('ipblocklistempty') . '</li>');
}
$wgOut->addHTML("</ul>\n");
$wgOut->addHTML($paging);
}
示例3: showList
function showList($msg)
{
global $wgOut;
$wgOut->setPagetitle(wfMsg("ipblocklist"));
if ("" != $msg) {
$wgOut->setSubtitle($msg);
}
$wgOut->addHTML("<ul>");
// FIXME hack to solve #bug 1487
if (!Block::enumBlocks("wfAddRow", 0)) {
$wgOut->addHTML('<li>' . wfMsg('ipblocklistempty') . '</li>');
}
$wgOut->addHTML("</ul>\n");
}
示例4: showList
function showList($msg)
{
global $wgOut;
$wgOut->setPagetitle(wfMsg("ipblocklist"));
if ("" != $msg) {
$wgOut->setSubtitle($msg);
}
$wgOut->addHTML("<ul>");
Block::enumBlocks("wfAddRow", 0);
$wgOut->addHTML("</ul>\n");
}