本文整理汇总了PHP中ReverseChronologicalPager::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ReverseChronologicalPager::__construct方法的具体用法?PHP ReverseChronologicalPager::__construct怎么用?PHP ReverseChronologicalPager::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReverseChronologicalPager
的用法示例。
在下文中一共展示了ReverseChronologicalPager::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Construct instance of class.
* @param $special object calling object
* @param $type string type of log - 'bannercontent' or 'bannermessages' (optional)
*/
function __construct($special, $type = 'bannercontent')
{
$this->special = $special;
parent::__construct();
$this->viewPage = SpecialPage::getTitleFor('NoticeTemplate', 'view');
$this->logType = $type;
}
示例2: array
function __construct($form, $conds = array(), $title)
{
$this->mForm = $form;
$this->mConds = $conds;
$this->pageID = $title->getArticleID();
parent::__construct();
}
示例3: array
function __construct($specialPage, $searchConds, $y, $m)
{
parent::__construct();
$this->getDateCond($y, $m);
$this->searchConds = $searchConds ? $searchConds : array();
$this->specialPage = $specialPage;
}
示例4: foreach
function __construct(IContextSource $context, array $options)
{
parent::__construct($context);
$msgs = ['diff', 'hist', 'pipe-separator', 'uctop'];
foreach ($msgs as $msg) {
$this->messages[$msg] = $this->msg($msg)->escaped();
}
$this->target = isset($options['target']) ? $options['target'] : '';
$this->contribs = isset($options['contribs']) ? $options['contribs'] : 'users';
$this->namespace = isset($options['namespace']) ? $options['namespace'] : '';
$this->tagFilter = isset($options['tagfilter']) ? $options['tagfilter'] : false;
$this->nsInvert = isset($options['nsInvert']) ? $options['nsInvert'] : false;
$this->associated = isset($options['associated']) ? $options['associated'] : false;
$this->deletedOnly = !empty($options['deletedOnly']);
$this->topOnly = !empty($options['topOnly']);
$this->newOnly = !empty($options['newOnly']);
$this->hideMinor = !empty($options['hideMinor']);
$year = isset($options['year']) ? $options['year'] : false;
$month = isset($options['month']) ? $options['month'] : false;
$this->getDateCond($year, $month);
// Most of this code will use the 'contributions' group DB, which can map to replica DBs
// with extra user based indexes or partioning by user. The additional metadata
// queries should use a regular replica DB since the lookup pattern is not all by user.
$this->mDbSecondary = wfGetDB(DB_REPLICA);
// any random replica DB
$this->mDb = wfGetDB(DB_REPLICA, 'contributions');
}
示例5:
function __construct($par = null)
{
global $wgRequest;
$this->like = $wgRequest->getText('like');
$this->showbots = $wgRequest->getBool('showbots', 0);
$this->skin = $this->getSkin();
parent::__construct();
}
示例6: array
function __construct(IContextSource $context = null)
{
parent::__construct($context);
// Override the defaults
$this->mLimitsShown = array(10, 20);
$this->mDefaultLimit = 10;
$this->mLimit = 10;
}
示例7: wfGetDB
function __construct()
{
global $wgSpecialsDB;
parent::__construct();
$this->mDb = wfGetDB(DB_SLAVE, array(), $wgSpecialsDB);
// create a Linker object so we don't have to create it every time in formatRow
$this->linker = new Linker();
}
示例8: __construct
public function __construct()
{
global $wgExternalSharedDB, $wgRequest;
parent::__construct();
$this->mDb = wfGetDB(DB_SLAVE, array(), $wgExternalSharedDB);
$this->mSearchText = $wgRequest->getText('wpPhalanxCheckBlocker', null);
$this->mSearchFilter = $wgRequest->getArray('wpPhalanxTypeFilter');
$this->mSearchId = $wgRequest->getInt('id');
}
示例9: list
function __construct($special)
{
$this->special = $special;
parent::__construct();
// Override paging defaults
list($this->mLimit, ) = $this->mRequest->getLimitOffset(20, '');
$this->mLimitsShown = array(20, 50, 100);
$this->viewPage = SpecialPage::getTitleFor('CentralNotice');
}
示例10:
function __construct(IContextSource $context, $par = null)
{
$this->like = $context->getRequest()->getText('like');
$this->showbots = $context->getRequest()->getBool('showbots', 0);
if (is_numeric($par)) {
$this->setLimit($par);
}
parent::__construct($context);
}
示例11: array
function __construct($specialPage, $searchConds, $y, $m)
{
parent::__construct();
/*
$this->messages = array_map( 'wfMsg',
array( 'comma-separator', 'checkuser-log-userips', 'checkuser-log-ipedits', 'checkuser-log-ipusers',
'checkuser-log-ipedits-xff', 'checkuser-log-ipusers-xff' ) );*/
$this->getDateCond($y, $m);
$this->searchConds = $searchConds ? $searchConds : array();
$this->specialPage = $specialPage;
}
示例12: __construct
/**
* Constructor.
*
* @param IContextSource $context
* @param string $className
* @param array $conds
*/
public function __construct(IContextSource $context, array $conds = array())
{
$this->conds = $conds;
$this->context = $context;
$this->mDefaultDirection = true;
if (method_exists('ReverseChronologicalPager', 'getUser')) {
parent::__construct($context);
} else {
parent::__construct();
}
}
示例13: array
/**
* @param ImagePage $imagePage
*/
function __construct($imagePage)
{
parent::__construct($imagePage->getContext());
$this->mImagePage = $imagePage;
$this->mTitle = clone $imagePage->getTitle();
$this->mTitle->setFragment('#filehistory');
$this->mImg = null;
$this->mHist = array();
$this->mRange = array(0, 0);
// display range
}
示例14: wfGetDB
function __construct(SpecialMergeHistory $form, $conds, Title $source, Title $dest)
{
$this->mForm = $form;
$this->mConds = $conds;
$this->title = $source;
$this->articleID = $source->getArticleID();
$dbr = wfGetDB(DB_REPLICA);
$maxtimestamp = $dbr->selectField('revision', 'MIN(rev_timestamp)', ['rev_page' => $dest->getArticleID()], __METHOD__);
$this->maxTimestamp = $maxtimestamp;
parent::__construct($form->getContext());
}
示例15: list
function __construct($special)
{
$this->special = $special;
$this->editable = $special->editable;
parent::__construct();
// Override paging defaults
list($this->mLimit, ) = $this->mRequest->getLimitOffset(20, '');
$this->mLimitsShown = array(20, 50, 100);
$msg = Xml::encodeJsVar(wfMsg('centralnotice-confirm-delete'));
$this->onRemoveChange = "if( this.checked ) { this.checked = confirm( {$msg} ) }";
$this->viewPage = SpecialPage::getTitleFor('NoticeTemplate', 'view');
}