3 namespace MediaWiki\Edit
;
5 use Wikimedia\Parsoid\Core\SelserData
;
8 * Stash for Parsoid output and associated data as needed to perform selective serialization (aka "selser")
16 interface ParsoidOutputStash
{
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.
22 * A SelserContext stashed by calling this method can for some time be retrieved by
23 * calling the get() method.
25 * @param ParsoidRenderID $renderId Combination of revision ID and revision's time ID
26 * @param SelserContext $selserContext
28 * @return bool True on success
30 public function set( ParsoidRenderID
$renderId, SelserContext
$selserContext ): bool;
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.
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.
39 * @param ParsoidRenderID $renderId
41 * @return ?SelserContext
43 public function get( ParsoidRenderID
$renderId ): ?SelserContext
;