1<?php
2declare( strict_types = 1 );
3
4namespace Wikimedia\Parsoid\Core;
5
6use DOMDocument;
7
8/**
9 * Data that's necessary for selective serialization, to be passed to the
10 * library entrypoint.
11 */
12class SelserData {
13
14	/** @var string */
15	public $oldText;
16
17	/** @var string */
18	public $oldHTML;
19
20	/**
21	 * DOM document corresponding to $oldHTML
22	 * @var DOMDocument
23	 */
24	public $oldDOM;
25
26	/**
27	 * Data that's necessary to perform selective serialization.
28	 *
29	 * @param string $oldText
30	 * @param ?string $oldHTML
31	 */
32	public function __construct( string $oldText, ?string $oldHTML = null ) {
33		$this->oldText = $oldText;
34		$this->oldHTML = $oldHTML;
35	}
36
37}
38