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 | declare( strict_types = 1 ); |
| 3 | |
| 4 | namespace Wikimedia\Parsoid\Core; |
| 5 | |
| 6 | /** |
| 7 | * Represents a "source text" for a SourceRange. |
| 8 | * |
| 9 | * Fundamentally this just consists of a source string. |
| 10 | * |
| 11 | * Maybe eventually we'll support "derived sources" which are substrings |
| 12 | * of another source? And we'll probably want some sort of short name or |
| 13 | * ID so these can be serialized eventually; maybe that will want to map |
| 14 | * to a particular slot of a particular revision of a particular title |
| 15 | * in MediaWiki so that an editor can replace or update the substring |
| 16 | * corresponding to a particular DOM element. |
| 17 | */ |
| 18 | interface Source { |
| 19 | |
| 20 | public function getSrcText(): string; |
| 21 | |
| 22 | } |