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 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\CampaignEvents\Event\Store; |
6 | |
7 | use MediaWiki\Extension\CampaignEvents\Event\ExistingEventRegistration; |
8 | use MediaWiki\Extension\CampaignEvents\MWEntity\ICampaignsPage; |
9 | use Wikimedia\Rdbms\IDBAccessObject; |
10 | |
11 | interface IEventLookup { |
12 | public const LOOKUP_SERVICE_NAME = 'CampaignEventsEventLookup'; |
13 | |
14 | /** |
15 | * @param int $eventID |
16 | * @return ExistingEventRegistration |
17 | * @throws EventNotFoundException |
18 | */ |
19 | public function getEventByID( int $eventID ): ExistingEventRegistration; |
20 | |
21 | /** |
22 | * Get the event associated with the given page. |
23 | * |
24 | * @note This does not perform any canonicalization on the given page. For that, see {@see PageEventLookup}. |
25 | * This method should not be used directly unless you want to avoid canonicalization (which you usually don't want |
26 | * to avoid outside the storage layer). |
27 | * |
28 | * @param ICampaignsPage $page |
29 | * @param int $readFlags One of the IDBAccessObject::READ_* constants |
30 | * @return ExistingEventRegistration |
31 | * @throws EventNotFoundException |
32 | */ |
33 | public function getEventByPage( |
34 | ICampaignsPage $page, |
35 | int $readFlags = IDBAccessObject::READ_NORMAL |
36 | ): ExistingEventRegistration; |
37 | |
38 | /** |
39 | * @param int $organizerID |
40 | * @param int $limit |
41 | * @return ExistingEventRegistration[] |
42 | */ |
43 | public function getEventsByOrganizer( int $organizerID, int $limit ): array; |
44 | |
45 | /** |
46 | * @param int $participantID |
47 | * @param int $limit |
48 | * @return ExistingEventRegistration[] |
49 | */ |
50 | public function getEventsByParticipant( int $participantID, int $limit ): array; |
51 | } |