本文整理汇总了PHP中LogEventsList::getContext方法的典型用法代码示例。如果您正苦于以下问题:PHP LogEventsList::getContext方法的具体用法?PHP LogEventsList::getContext怎么用?PHP LogEventsList::getContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogEventsList
的用法示例。
在下文中一共展示了LogEventsList::getContext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param LogEventsList $list
* @param string $types or Array: log types to show
* @param string $performer the user who made the log entries
* @param string|Title $title the page title the log entries are for
* @param string $pattern do a prefix search rather than an exact title match
* @param array $conds extra conditions for the query
* @param int $year The year to start from
* @param int $month The month to start from
* @param string $tagFilter tag
*/
public function __construct($list, $types = array(), $performer = '', $title = '', $pattern = '', $conds = array(), $year = false, $month = false, $tagFilter = '')
{
parent::__construct($list->getContext());
$this->mConds = $conds;
$this->mLogEventsList = $list;
$this->limitType($types);
// also excludes hidden types
$this->limitPerformer($performer);
$this->limitTitle($title, $pattern);
$this->getDateCond($year, $month);
$this->mTagFilter = $tagFilter;
}
示例2: __construct
/**
* Constructor
*
* @param LogEventsList $list
* @param string|array $types Log types to show
* @param string $performer The user who made the log entries
* @param string|Title $title The page title the log entries are for
* @param string $pattern Do a prefix search rather than an exact title match
* @param array $conds Extra conditions for the query
* @param int|bool $year The year to start from. Default: false
* @param int|bool $month The month to start from. Default: false
* @param string $tagFilter Tag
* @param string $action Specific action (subtype) requested
*/
public function __construct($list, $types = [], $performer = '', $title = '', $pattern = '', $conds = [], $year = false, $month = false, $tagFilter = '', $action = '')
{
parent::__construct($list->getContext());
$this->mConds = $conds;
$this->mLogEventsList = $list;
$this->limitType($types);
// also excludes hidden types
$this->limitPerformer($performer);
$this->limitTitle($title, $pattern);
$this->limitAction($action);
$this->getDateCond($year, $month);
$this->mTagFilter = $tagFilter;
$this->mDb = wfGetDB(DB_REPLICA, 'logpager');
}