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 | namespace MediaWiki\Wikispeech\Segment; |
4 | |
5 | /** |
6 | * @file |
7 | * @ingroup Extensions |
8 | * @license GPL-2.0-or-later |
9 | */ |
10 | |
11 | use Title; |
12 | |
13 | /** |
14 | * Handler for loading page content and properties. |
15 | * This can either be the local wiki via the MediaWiki core API {@link LocalWikiPageProvider} |
16 | * or a remote wiki via HTTP API {@link RemoteWikiPageProvider} when client supplies a consumer-url. |
17 | * |
18 | * @since 0.1.10 |
19 | */ |
20 | interface PageProvider { |
21 | |
22 | /** |
23 | * @since 0.1.10 |
24 | * @return string |
25 | */ |
26 | public function getCachedSegmentsKeyComponents(): string; |
27 | |
28 | /** |
29 | * Loads title and pageId given a revision id. |
30 | * |
31 | * @since 0.1.10 |
32 | * @param int $revisionId |
33 | * @return PageRevisionProperties |
34 | */ |
35 | public function loadPageRevisionProperties( int $revisionId ): PageRevisionProperties; |
36 | |
37 | /** |
38 | * Loads display title, page content and fetched revision id. |
39 | * |
40 | * @since 0.1.10 |
41 | * @param Title $title |
42 | */ |
43 | public function loadData( Title $title ): void; |
44 | |
45 | /** |
46 | * Revision id of the fetched page. |
47 | * |
48 | * @since 0.1.10 |
49 | * @return int|null |
50 | */ |
51 | public function getRevisionId(): ?int; |
52 | |
53 | /** |
54 | * @since 0.1.10 |
55 | * @return string|null |
56 | */ |
57 | public function getPageContent(): ?string; |
58 | |
59 | /** |
60 | * @since 0.1.10 |
61 | * @return string|null |
62 | */ |
63 | public function getDisplayTitle(): ?string; |
64 | |
65 | } |