Represents a source offset range for a key-value pair.
More...
|
| | __construct (int $keyStart, int $keyEnd, int $valueStart, int $valueEnd, ?Source $keySource=null, ?Source $valueSource=null) |
| | Create a new key-value source offset range.
|
| |
|
| __clone () |
| |
| | offset (int $amount) |
| | Return a new key-value source offset range shifted by $amount.
|
| |
|
| span () |
| | Return a new source range spanning both the key and value of this KVSourceRange.
|
| |
|
| toJsonArray () |
| |
|
| static | newFromJsonArray (array $json) |
| | Create a new key-value source offset range from an array of integers (such as created during JSON serialization).
|
| |
Represents a source offset range for a key-value pair.
◆ __construct()
| Wikimedia\Parsoid\Tokens\KVSourceRange::__construct |
( |
int | $keyStart, |
|
|
int | $keyEnd, |
|
|
int | $valueStart, |
|
|
int | $valueEnd, |
|
|
?Source | $keySource = null, |
|
|
?Source | $valueSource = null ) |
Create a new key-value source offset range.
- Parameters
-
| int | $keyStart | The start index of the key (unicode code points, inclusive) |
| int | $keyEnd | The end index of the key (unicode code points, exclusive) |
| int | $valueStart | The start index of the value (unicode code points, inclusive) |
| int | $valueEnd | The end index of the value (unicode code points, exclusive) |
| ?Source | $keySource | |
| ?Source | $valueSource | |
◆ newFromJsonArray()
| static Wikimedia\Parsoid\Tokens\KVSourceRange::newFromJsonArray |
( |
array | $json | ) |
|
|
static |
Create a new key-value source offset range from an array of integers (such as created during JSON serialization).
- Parameters
-
- Returns
- KVSourceRange
◆ offset()
| Wikimedia\Parsoid\Tokens\KVSourceRange::offset |
( |
int | $amount | ) |
|
Return a new key-value source offset range shifted by $amount.
- Parameters
-
| int | $amount | The amount to shift by |
- Returns
- KVSourceRange
The documentation for this class was generated from the following file:
- src/Tokens/KVSourceRange.php