| 1 |
<?php |
| 2 |
/** |
| 3 |
* HTML Span: Represents a textual span inside an HTML document. |
| 4 |
* |
| 5 |
* @package WordPress |
| 6 |
* @subpackage HTML |
| 7 |
* @since 6.2.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
/** |
| 11 |
* Represents a textual span inside an HTML document. |
| 12 |
* |
| 13 |
* This is a two-tuple in disguise, used to avoid the memory |
| 14 |
* overhead involved in using an array for the same purpose. |
| 15 |
* |
| 16 |
* This class is for internal usage of the WP_HTML_Tag_Processor class. |
| 17 |
* |
| 18 |
* @access private |
| 19 |
* @since 6.2.0 |
| 20 |
* |
| 21 |
* @see WP_HTML_Tag_Processor |
| 22 |
*/ |
| 23 |
class WP_HTML_Span { |
| 24 |
/** |
| 25 |
* Byte offset into document where span begins. |
| 26 |
* |
| 27 |
* @since 6.2.0 |
| 28 |
* @var int |
| 29 |
*/ |
| 30 |
public $start; |
| 31 |
|
| 32 |
/** |
| 33 |
* Byte offset into document where span ends. |
| 34 |
* |
| 35 |
* @since 6.2.0 |
| 36 |
* @var int |
| 37 |
*/ |
| 38 |
public $end; |
| 39 |
|
| 40 |
/** |
| 41 |
* Constructor. |
| 42 |
* |
| 43 |
* @since 6.2.0 |
| 44 |
* |
| 45 |
* @param int $start Byte offset into document where replacement span begins. |
| 46 |
* @param int $end Byte offset into document where replacement span ends. |
| 47 |
*/ |
| 48 |
public function __construct( $start, $end ) { |
| 49 |
$this->start = $start; |
| 50 |
$this->end = $end; |
| 51 |
} |
| 52 |
} |
| 53 |
|