PocketMine-MP
5.27.1 git-9af3cde03fabbe4129c79e46dc87ffa0fff446e6
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
c
d
e
g
i
m
n
o
p
r
s
t
Functions
Variables
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
$
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Files
File List
▼
PocketMine-MP
PocketMine-MP API Documentation
Deprecated List
►
Namespaces
►
Classes
▼
Files
▼
File List
►
src
▼
vendor
▼
pocketmine
►
bedrock-data
►
bedrock-protocol
►
binaryutils
►
callback-validator
►
color
►
errorhandler
►
log
►
math
▼
nbt
▼
src
▼
tag
ByteArrayTag.php
ByteTag.php
CompoundTag.php
DoubleTag.php
FloatTag.php
ImmutableTag.php
IntArrayTag.php
IntegerishTagTrait.php
IntTag.php
ListTag.php
LongTag.php
NoDynamicFieldsTrait.php
ShortTag.php
StringTag.php
Tag.php
BaseNbtSerializer.php
BigEndianNbtSerializer.php
InvalidTagValueException.php
JsonNbtParser.php
LittleEndianNbtSerializer.php
NBT.php
NbtDataException.php
NbtException.php
NbtStreamReader.php
NbtStreamWriter.php
NoSuchTagException.php
ReaderTracker.php
TreeRoot.php
UnexpectedTagTypeException.php
►
raklib
►
raklib-ipc
►
snooze
•
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Pages
Loading...
Searching...
No Matches
IntArrayTag.php
1
<?php
2
3
/*
4
*
5
* ____ _ _ __ __ _ __ __ ____
6
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10
*
11
* This program is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
15
*
16
* @author PocketMine Team
17
* @link http://www.pocketmine.net/
18
*
19
*
20
*/
21
22
declare(strict_types=1);
23
24
namespace
pocketmine\nbt\tag;
25
26
use
pocketmine\nbt\NBT
;
27
use
pocketmine\nbt\NbtStreamReader
;
28
use
pocketmine\nbt\NbtStreamWriter
;
29
use
function
array_values;
30
use
function
assert;
31
use
function
func_num_args;
32
use
function
implode;
33
use
function
is_int;
34
35
final
class
IntArrayTag
extends
ImmutableTag
{
40
private
$value;
41
46
public
function
__construct
(array $value){
47
self::restrictArgCount(__METHOD__, func_num_args(), 1);
48
assert((
function
() use(&$value) :
bool
{
49
foreach
($value as $v){
50
if
(!is_int($v)){
51
return
false
;
52
}
53
}
54
55
return
true
;
56
})());
57
58
$this->value = array_values($value);
59
}
46
public
function
__construct
(array $value) {
…
}
60
61
protected
function
getTypeName() : string{
62
return
"IntArray"
;
63
}
64
65
public
function
getType() : int{
66
return
NBT
::TAG_IntArray;
67
}
68
69
public
static
function
read(NbtStreamReader $reader) : self{
70
return new self($reader->readIntArray());
71
}
72
73
public
function
write(NbtStreamWriter $writer) : void{
74
$writer->writeIntArray($this->value);
75
}
76
77
protected
function
stringifyValue(
int
$indentation) : string{
78
return
"["
. implode(
","
, $this->value) .
"]"
;
79
}
80
85
public
function
getValue
() : array{
86
return $this->value;
87
}
85
public
function
getValue
() : array {
…
}
88
}
35
final
class
IntArrayTag
extends
ImmutableTag
{
…
};
pocketmine\nbt\NBT
Definition
NBT.php:42
pocketmine\nbt\tag\ImmutableTag
Definition
ImmutableTag.php:26
pocketmine\nbt\tag\IntArrayTag
Definition
IntArrayTag.php:35
pocketmine\nbt\tag\IntArrayTag\getValue
getValue()
Definition
IntArrayTag.php:85
pocketmine\nbt\tag\IntArrayTag\__construct
__construct(array $value)
Definition
IntArrayTag.php:46
pocketmine\nbt\NbtStreamReader
Definition
NbtStreamReader.php:31
pocketmine\nbt\NbtStreamWriter
Definition
NbtStreamWriter.php:29
vendor
pocketmine
nbt
src
tag
IntArrayTag.php
Generated by
1.12.0