Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace GrowthExperiments\UserImpact;
4
5use IDBAccessObject;
6use MediaWiki\User\UserIdentity;
7
8interface UserImpactLookup {
9
10    /**
11     * Retrieve impact data for a given user.
12     * @param UserIdentity $user
13     * @param int $flags bit field, see IDBAccessObject::READ_XXX
14     * @return UserImpact|null
15     */
16    public function getUserImpact( UserIdentity $user, int $flags = IDBAccessObject::READ_NORMAL ): ?UserImpact;
17
18    /**
19     * Retrieve impact data for a given user, including expensive data.
20     * @param UserIdentity $user
21     * @param int $flags bit field, see IDBAccessObject::READ_XXX
22     * @param array $priorityArticles List of article titles in DBKey format. When fetching page view data, we should
23     *  first fetch data for these articles, then any others that are in the list of articles that the user has
24     *  edited.
25     * @return ExpensiveUserImpact|null
26     */
27    public function getExpensiveUserImpact(
28        UserIdentity $user,
29        int $flags = IDBAccessObject::READ_NORMAL,
30        array $priorityArticles = []
31    ): ?ExpensiveUserImpact;
32
33}