◆ __construct()
__construct |
( |
|
$name = "" , |
|
|
|
$value = [] |
|
) |
| |
ListTag constructor.
- Parameters
-
40 $this->__name = $name;
41 foreach(
$value as $k => $v){
◆ __toString()
- Returns
- string
273 $str = get_class($this) .
"{\n";
274 foreach($this as $tag){
275 if($tag instanceof Tag){
276 $str .= get_class($tag) .
":" . $tag->__toString() .
"\n";
◆ count()
count |
( |
|
$mode = COUNT_NORMAL | ) |
|
- Parameters
-
- Returns
- int
125 for($i = 0;
true; $i++){
126 if(!isset($this->{$i})){
129 if($mode === COUNT_RECURSIVE){
130 if($this->{$i} instanceof \Countable){
131 $i +=
count($this->{$i});
◆ getCount()
- Returns
- int
65 foreach($this as $tag){
66 if($tag instanceof Tag){
◆ getTagType()
- Returns
- mixed
157 return $this->tagType;
◆ getType()
◆ getValue()
- Returns
- array
51 foreach($this as $k => $v){
52 if($v instanceof Tag){
◆ offsetExists()
- Parameters
-
- Returns
- bool
80 return isset($this->{$offset});
◆ offsetGet()
- Parameters
-
- Returns
- null
89 if(isset($this->{$offset}) and $this->{$offset} instanceof Tag){
90 if($this->{$offset} instanceof \ArrayAccess){
91 return $this->{$offset};
93 return $this->{$offset}->getValue();
◆ offsetSet()
offsetSet |
( |
|
$offset, |
|
|
|
$value |
|
) |
| |
- Parameters
-
105 if(
$value instanceof Tag){
106 $this->{$offset} =
$value;
107 }elseif($this->{$offset} instanceof Tag){
108 $this->{$offset}->setValue(
$value);
◆ offsetUnset()
- Parameters
-
116 unset($this->{$offset});
◆ read()
read |
( |
NBT |
$nbt, |
|
|
bool |
$network = false |
|
) |
| |
- Parameters
-
- Returns
- mixed|void
168 $this->tagType = $nbt->getByte();
169 $size = $nbt->getInt($network);
170 for($i = 0; $i < $size and !$nbt->feof(); ++$i){
171 switch($this->tagType){
174 $tag->read($nbt, $network);
178 $tag =
new ShortTag(
"");
179 $tag->read($nbt, $network);
184 $tag->read($nbt, $network);
189 $tag->read($nbt, $network);
194 $tag->read($nbt, $network);
198 $tag =
new DoubleTag(
"");
199 $tag->read($nbt, $network);
204 $tag->read($nbt, $network);
209 $tag->read($nbt, $network);
214 $tag->read($nbt, $network);
219 $tag->read($nbt, $network);
224 $tag->read($nbt, $network);
◆ setTagType()
- Parameters
-
150 $this->tagType = $type;
The documentation for this class was generated from the following file:
- src/pocketmine/nbt/tag/ListTag.php