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\Edit; |
4 | |
5 | use Wikimedia\Parsoid\Core\SelserData; |
6 | |
7 | /** |
8 | * Stash for Parsoid output and associated data as needed to perform selective serialization (aka "selser") |
9 | * of modified HTML. |
10 | * |
11 | * @see SelserData |
12 | * |
13 | * @internal |
14 | * @since 1.39 |
15 | */ |
16 | interface ParsoidOutputStash { |
17 | |
18 | /** |
19 | * Stash a SelserContext representing a rendering of a revision at a given point in time, |
20 | * along with information about the content the rendering was based on. |
21 | * |
22 | * A SelserContext stashed by calling this method can for some time be retrieved by |
23 | * calling the get() method. |
24 | * |
25 | * @param ParsoidRenderID $renderId Combination of revision ID and revision's time ID |
26 | * @param SelserContext $selserContext |
27 | * |
28 | * @return bool True on success |
29 | */ |
30 | public function set( ParsoidRenderID $renderId, SelserContext $selserContext ): bool; |
31 | |
32 | /** |
33 | * Retrieve a SelserContext representing a rendering of a revision at a given point in time, |
34 | * along with information about the content the rendering was based on. |
35 | * |
36 | * If a SelserContext was stahed using the set() method not too long ago, it can be expected |
37 | * to be returned from this method. |
38 | * |
39 | * @param ParsoidRenderID $renderId |
40 | * |
41 | * @return ?SelserContext |
42 | */ |
43 | public function get( ParsoidRenderID $renderId ): ?SelserContext; |
44 | |
45 | } |