|
PocketMine-MP 5.39.4 git-a2b7d660558310260c376d1eeaff549367b9fc6e
|
Inheritance diagram for pocketmine\nbt\tag\ListTag:
Collaboration diagram for pocketmine\nbt\tag\ListTag:Public Member Functions | |
| __construct (array $value=[], int $tagType=NBT::TAG_End) | |
| __clone () | |
| __toString () | |
| cast (string $tagClass) | |
| count () | |
| empty () | |
| equals (Tag $that) | |
| first () | |
| get (int $offset) | |
| getAllValues () | |
| getCount () | |
| getIterator () | |
| getTagType () | |
| getType () | |
| getValue () | |
| insert (int $offset, Tag $tag) | |
| isset (int $offset) | |
| last () | |
| pop () | |
| push (Tag $tag) | |
| remove (int $offset) | |
| safeClone () | |
| set (int $offset, Tag $tag) | |
| setTagType (int $type) | |
| shift () | |
| toString (int $indentation=0) | |
| unshift (Tag $tag) | |
| write (NbtStreamWriter $writer) | |
Static Public Member Functions | |
| static | read (NbtStreamReader $reader, ReaderTracker $tracker) |
Protected Member Functions | |
| getTypeName () | |
| makeCopy () | |
| stringifyValue (int $indentation) | |
Static Protected Member Functions | |
| static | restrictArgCount (string $func, int $haveArgs, int $wantMaxArgs) |
Protected Attributes | |
| $cloning = false | |
@phpstan-template TValue of Tag = Tag @phpstan-implements \IteratorAggregate<int, TValue>
Definition at line 48 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::__construct | ( | array | $value = [], |
| int | $tagType = NBT::TAG_End ) |
| Tag[] | $value | @phpstan-param TValue[] $value |
Definition at line 63 of file ListTag.php.
References pocketmine\nbt\tag\ListTag\push().
Here is the call graph for this function:| pocketmine\nbt\tag\ListTag::__clone | ( | ) |
Definition at line 350 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::cast | ( | string | $tagClass | ) |
Returns $this if the tag values are of type $tagClass, null otherwise. The returned value will have the proper PHPStan generic types set if it matches.
If the list is empty, the cast will always succeed, as empty lists infer their type from the first value inserted.
@phpstan-template TTarget of Tag @phpstan-param class-string<TTarget> $tagClass
@phpstan-return self<TTarget>|null
Definition at line 109 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::count | ( | ) |
Definition at line 113 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::empty | ( | ) |
Returns whether there are any tags in the list.
Definition at line 262 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::equals | ( | Tag | $that | ) |
Compares this Tag to the given Tag and determines whether or not they are equal, based on type and value. Complex tag types should override this to provide proper value comparison.
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 366 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::first | ( | ) |
Returns the element in the first position of the list, without removing it. @phpstan-return TValue
Definition at line 217 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::get | ( | int | $offset | ) |
Returns the tag at the specified offset.
@phpstan-return TValue
OutOfRangeException if the offset is not within the bounds of the list
Definition at line 206 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::getAllValues | ( | ) |
Returns an array of tag values inserted into this list.
Definition at line 84 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::getCount | ( | ) |
Definition at line 117 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::getIterator | ( | ) |
Definition at line 362 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::getTagType | ( | ) |
Returns the type of tag contained in this list.
Definition at line 277 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::getType | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 270 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 266 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::getValue | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 75 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::insert | ( | int | $offset, |
| Tag | $tag ) |
Inserts a tag into the list between existing tags, at the specified offset. Later values in the list are moved up by 1 position.
@phpstan-template TNewValue of TValue @phpstan-param TNewValue $tag @phpstan-this-out self<TNewValue>
OutOfRangeException if the offset is not within the bounds of the list
Definition at line 178 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::isset | ( | int | $offset | ) |
Returns whether a tag exists at the specified offset.
Definition at line 255 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::last | ( | ) |
Returns the element in the last position in the list (the end), without removing it. @phpstan-return TValue
Definition at line 228 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 354 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::pop | ( | ) |
Removes the last tag from the list and returns it. @phpstan-return TValue
Definition at line 137 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::push | ( | Tag | $tag | ) |
Appends the specified tag to the end of the list.
@phpstan-template TNewValue of TValue @phpstan-param TNewValue $tag @phpstan-this-out self<TNewValue>
Definition at line 128 of file ListTag.php.
Referenced by pocketmine\nbt\tag\ListTag\__construct().
Here is the caller graph for this function:
|
static |
Definition at line 315 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::remove | ( | int | $offset | ) |
Removes a value from the list. All later tags in the list are moved down by 1 position.
Definition at line 192 of file ListTag.php.
|
staticprotectedinherited |
|
inherited |
| pocketmine\nbt\tag\ListTag::set | ( | int | $offset, |
| Tag | $tag ) |
Overwrites the tag at the specified offset.
@phpstan-template TNewValue of TValue @phpstan-param TNewValue $tag @phpstan-this-out self<TNewValue>
OutOfRangeException if the offset is not within the bounds of the list
Definition at line 244 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::setTagType | ( | int | $type | ) |
LogicException if the list is not empty
Definition at line 292 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::shift | ( | ) |
Removes the first tag from the list and returns it. @phpstan-return TValue
Definition at line 160 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 342 of file ListTag.php.
|
finalinherited |
| pocketmine\nbt\tag\ListTag::unshift | ( | Tag | $tag | ) |
Adds the specified tag to the start of the list.
@phpstan-template TNewValue of TValue @phpstan-param TNewValue $tag @phpstan-this-out self<TNewValue>
Definition at line 151 of file ListTag.php.
| pocketmine\nbt\tag\ListTag::write | ( | NbtStreamWriter | $writer | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 334 of file ListTag.php.