|
| __construct (Element $node) |
|
| add (Element $node) |
| Add an Element to array in O(1) time by using Node::$_documentIndex as the array index.
|
|
| del (Element $node) |
| Remove an Element from the array in O(1) time by using Node::$_documentIndex to perform the lookup.
|
|
Element | getFirst () |
| Retrieve that Element from the array which appears first in document order in the associated document.
|
|
Element MultiId | downgrade () |
| If there is only one node left, return it.
|
|
◆ __construct()
Wikimedia\Dodo\Internal\MultiId::__construct |
( |
Element | $node | ) |
|
◆ add()
Wikimedia\Dodo\Internal\MultiId::add |
( |
Element | $node | ) |
|
Add an Element to array in O(1) time by using Node::$_documentIndex as the array index.
- Parameters
-
◆ del()
Wikimedia\Dodo\Internal\MultiId::del |
( |
Element | $node | ) |
|
Remove an Element from the array in O(1) time by using Node::$_documentIndex to perform the lookup.
- Parameters
-
◆ downgrade()
If there is only one node left, return it.
Otherwise return "this".
- Returns
- Element|MultiId
◆ getFirst()
Element Wikimedia\Dodo\Internal\MultiId::getFirst |
( |
| ) |
|
Retrieve that Element from the array which appears first in document order in the associated document.
Cache the value for repeated lookups.
The cache is invalidated each time the array is modified. The list is modified when a Node is inserted or removed from a Document, or when the 'id' attribute value of a Node is changed.
- Returns
- ?Element null if there are no nodes
◆ $first
Element Wikimedia\Dodo\Internal\MultiId::$first = null |
The first element, in document order.
null indicates the cache is not set and the first element must be re-computed.
◆ $length
int Wikimedia\Dodo\Internal\MultiId::$length = 0 |
◆ $table
Element [] Wikimedia\Dodo\Internal\MultiId::$table = array( ) |
The documentation for this class was generated from the following file: