Represents a source offset range for a key-value pair.
More...
|
| __construct (int $keyStart, int $keyEnd, int $valueStart, int $valueEnd) |
| Create a new key-value source offset range.
|
|
| __clone () |
|
| offset (int $amount) |
| Return a new key-value source offset range shifted by $amount.
|
|
| toJsonArray () |
|
|
static | newFromJsonArray (array $so) |
| 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 ) |
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) |
◆ newFromJsonArray()
static Wikimedia\Parsoid\Tokens\KVSourceRange::newFromJsonArray |
( |
array | $so | ) |
|
|
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