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\Parser; |
4 | |
5 | /** |
6 | * Read-only interface for metadata about a ParserCache entry. |
7 | * @since 1.36 |
8 | */ |
9 | interface ParserCacheMetadata { |
10 | |
11 | /** |
12 | * Returns the timestamp when the output was cached |
13 | * or -1 for uncacheable for legacy reasons. |
14 | * @todo remove legacy -1 |
15 | * |
16 | * @return string|int TS_MW timestamp |
17 | */ |
18 | public function getCacheTime(); |
19 | |
20 | /** |
21 | * @return int|null Revision id, if any was set |
22 | */ |
23 | public function getCacheRevisionId(): ?int; |
24 | |
25 | /** |
26 | * Returns the number of seconds after which this object should expire. |
27 | * This method is used by ParserCache to determine how long the ParserOutput can be cached. |
28 | * The timestamp of expiry can be calculated by adding getCacheExpiry() to getCacheTime(). |
29 | * The value returned by getCacheExpiry is smaller or equal to the smallest number |
30 | * that was provided to a call of ParserOutput::updateCacheExpiry(), |
31 | * and smaller or equal to the value of $wgParserCacheExpireTime. |
32 | * |
33 | * @return int |
34 | */ |
35 | public function getCacheExpiry(): int; |
36 | |
37 | /** |
38 | * Returns the options from its ParserOptions which have been taken |
39 | * into account to produce the output. |
40 | * |
41 | * @return string[] |
42 | */ |
43 | public function getUsedOptions(): array; |
44 | } |