List of Snak objects.
More...
|
| getNewOffset () |
| Finds a new offset for when appending an element.
|
|
| setElement ( $index, $value) |
| Method that actually sets the element and holds all common code needed for set operations, including type checking and offset resolving.
|
|
List of Snak objects.
Indexes the snaks by hash and ensures no more the one snak with the same hash are in the list.
- Since
- 0.1
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Addshore
◆ __construct()
Wikibase\DataModel\Snak\SnakList::__construct |
( |
| $snaks = [] | ) |
|
- Parameters
-
Snak[] | Traversable | $snaks | |
- Exceptions
-
◆ __serialize()
Wikibase\DataModel\Snak\SnakList::__serialize |
( |
| ) |
|
◆ __unserialize()
Wikibase\DataModel\Snak\SnakList::__unserialize |
( |
| $data | ) |
|
◆ addSnak()
Wikibase\DataModel\Snak\SnakList::addSnak |
( |
Snak | $snak | ) |
|
- Since
- 0.1
- Parameters
-
- Returns
- bool Indicates if the snak was added or not.
◆ append()
Wikibase\DataModel\Snak\SnakList::append |
( |
| $value | ) |
|
- See also
- ArrayObject::append
- Parameters
-
◆ equals()
Wikibase\DataModel\Snak\SnakList::equals |
( |
| $target | ) |
|
The comparison is done purely value based, ignoring the order of the elements in the array.
- Since
- 0.3
- Parameters
-
- Returns
- bool
◆ getHash()
Wikibase\DataModel\Snak\SnakList::getHash |
( |
| ) |
|
The hash is purely value based.
Order of the elements in the array is not held into account.
- Since
- 0.1
- Returns
- string
◆ getNewOffset()
Wikibase\DataModel\Snak\SnakList::getNewOffset |
( |
| ) |
|
|
private |
Finds a new offset for when appending an element.
The base class does this, so it would be better to integrate, but there does not appear to be any way to do this...
- Returns
- int
◆ getSnak()
Wikibase\DataModel\Snak\SnakList::getSnak |
( |
| $snakHash | ) |
|
- Since
- 0.1
- Parameters
-
- Returns
- Snak|bool
◆ hasSnak()
Wikibase\DataModel\Snak\SnakList::hasSnak |
( |
Snak | $snak | ) |
|
- Since
- 0.1
- Parameters
-
- Returns
- bool
◆ hasSnakHash()
Wikibase\DataModel\Snak\SnakList::hasSnakHash |
( |
| $snakHash | ) |
|
- Since
- 0.1
- Parameters
-
- Returns
- bool
◆ isEmpty()
Wikibase\DataModel\Snak\SnakList::isEmpty |
( |
| ) |
|
Returns if the ArrayObject has no elements.
- Returns
- bool
◆ offsetSet()
Wikibase\DataModel\Snak\SnakList::offsetSet |
( |
| $index, |
|
|
| $value ) |
- See also
- ArrayObject::offsetSet()
- Parameters
-
int | string | $index | |
Snak | $value | |
◆ removeSnak()
Wikibase\DataModel\Snak\SnakList::removeSnak |
( |
Snak | $snak | ) |
|
◆ removeSnakHash()
Wikibase\DataModel\Snak\SnakList::removeSnakHash |
( |
| $snakHash | ) |
|
◆ serialize()
Wikibase\DataModel\Snak\SnakList::serialize |
( |
| ) |
|
- See also
- Serializable::serialize
- Returns
- string
◆ setElement()
Wikibase\DataModel\Snak\SnakList::setElement |
( |
| $index, |
|
|
| $value ) |
|
private |
Method that actually sets the element and holds all common code needed for set operations, including type checking and offset resolving.
- Parameters
-
int | string | $index | |
Snak | $value | |
- Exceptions
-
◆ unserialize()
Wikibase\DataModel\Snak\SnakList::unserialize |
( |
| $serialized | ) |
|
- See also
- Serializable::unserialize
- Parameters
-
◆ $indexOffset
Wikibase\DataModel\Snak\SnakList::$indexOffset = 0 |
|
private |
◆ $offsetHashes
Wikibase\DataModel\Snak\SnakList::$offsetHashes = [] |
|
private |
The documentation for this class was generated from the following file: