当前位置: 首页>>代码示例>>PHP>>正文


PHP Block::enumBlocks方法代码示例

本文整理汇总了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', '');
     }
 }
开发者ID:BackupTheBerlios,项目名称:openzaurus-svn,代码行数:17,代码来源:BlockCache.php

示例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);
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:22,代码来源:SpecialIpblocklist.php

示例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");
 }
开发者ID:BackupTheBerlios,项目名称:openzaurus-svn,代码行数:14,代码来源:SpecialIpblocklist.php

示例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");
 }
开发者ID:BackupTheBerlios,项目名称:blahtex,代码行数:11,代码来源:SpecialIpblocklist.php


注:本文中的Block::enumBlocks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。