本文整理汇总了PHP中ApiPageSet::requestField方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiPageSet::requestField方法的具体用法?PHP ApiPageSet::requestField怎么用?PHP ApiPageSet::requestField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiPageSet
的用法示例。
在下文中一共展示了ApiPageSet::requestField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: requestExtraData
/**
* @param ApiPageSet $pageSet
* @return void
*/
public function requestExtraData($pageSet)
{
$pageSet->requestField('page_restrictions');
// If the pageset is resolving redirects we won't get page_is_redirect.
// But we can't know for sure until the pageset is executed (revids may
// turn it off), so request it unconditionally.
$pageSet->requestField('page_is_redirect');
$pageSet->requestField('page_is_new');
$config = $this->getConfig();
$pageSet->requestField('page_touched');
$pageSet->requestField('page_latest');
$pageSet->requestField('page_len');
if ($config->get('ContentHandlerUseDB')) {
$pageSet->requestField('page_content_model');
}
if ($config->get('PageLanguageUseDB')) {
$pageSet->requestField('page_lang');
}
}
示例2: requestExtraData
/**
* @param ApiPageSet $pageSet
* @return void
*/
public function requestExtraData($pageSet)
{
$pageSet->requestField('page_restrictions');
// when resolving redirects, no page will have this field
if (!$pageSet->isResolvingRedirects()) {
$pageSet->requestField('page_is_redirect');
}
$pageSet->requestField('page_is_new');
$config = $this->getConfig();
if (!$config->get('DisableCounters')) {
$pageSet->requestField('page_counter');
}
$pageSet->requestField('page_touched');
$pageSet->requestField('page_latest');
$pageSet->requestField('page_len');
if ($config->get('ContentHandlerUseDB')) {
$pageSet->requestField('page_content_model');
}
}