Ordered and unique collection of Statement objects.
More...
Ordered and unique collection of Statement objects.
Can only contain Statements that have a non-null GUID.
Provides indexed access by Statement GUID. Does not provide complex modification functionality.
- Since
- 3.0
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Kai Nissen < kai.n.nosp@m.isse.nosp@m.n@wik.nosp@m.imed.nosp@m.ia.de >
◆ __construct()
Wikibase\DataModel\Statement\StatementByGuidMap::__construct |
( |
| $statements = [] | ) |
|
- Parameters
-
Statement[] | Traversable | $statements | |
◆ addStatement()
Wikibase\DataModel\Statement\StatementByGuidMap::addStatement |
( |
Statement | $statement | ) |
|
If the provided statement has a GUID not yet in the map, it will be appended to the map.
If the GUID is already in the map, the statement with this guid will be replaced.
- Exceptions
-
- Parameters
-
◆ assertIsStatementGuid()
Wikibase\DataModel\Statement\StatementByGuidMap::assertIsStatementGuid |
( |
| $statementGuid | ) |
|
|
private |
◆ count()
Wikibase\DataModel\Statement\StatementByGuidMap::count |
( |
| ) |
|
- See also
- Countable::count
- Returns
- int
◆ getIterator()
Wikibase\DataModel\Statement\StatementByGuidMap::getIterator |
( |
| ) |
|
The iterator has the GUIDs of the statements as keys.
- See also
- IteratorAggregate::getIterator
- Returns
- Iterator|Statement[]
◆ getStatementByGuid()
Wikibase\DataModel\Statement\StatementByGuidMap::getStatementByGuid |
( |
| $statementGuid | ) |
|
- Parameters
-
- Returns
- Statement|null
◆ hasStatementWithGuid()
Wikibase\DataModel\Statement\StatementByGuidMap::hasStatementWithGuid |
( |
| $statementGuid | ) |
|
- Parameters
-
- Returns
- bool
- Exceptions
-
◆ removeStatementWithGuid()
Wikibase\DataModel\Statement\StatementByGuidMap::removeStatementWithGuid |
( |
| $statementGuid | ) |
|
Removes the statement with the specified GUID if it exists.
- Parameters
-
◆ toArray()
Wikibase\DataModel\Statement\StatementByGuidMap::toArray |
( |
| ) |
|
Returns the map in array form.
The array keys are the GUIDs of their associated statement.
- Returns
- Statement[]
◆ $statements
Wikibase\DataModel\Statement\StatementByGuidMap::$statements = [] |
|
private |
The documentation for this class was generated from the following file: