types[] = $type; } /** * Clears the types from the RDATA. */ public function clearTypes(): void { $this->types = []; } public function getTypes(): array { return $this->types; } public function getSoaSerial(): int { return $this->soaSerial; } public function setSoaSerial(int $soaSerial): void { $this->soaSerial = $soaSerial; } public function getFlags(): int { return $this->flags; } public function setFlags(int $flags): void { $this->flags = $flags; } public function toText(): string { return sprintf('%d %d %s', $this->soaSerial, $this->flags, implode(Tokens::SPACE, $this->types)); } /** * @throws UnsupportedTypeException */ public function toWire(): string { return pack('Nn', $this->soaSerial, $this->flags).NSEC::renderBitmap($this->types); } public function fromText(string $text): void { $rdata = explode(Tokens::SPACE, $text); $this->setSoaSerial((int) array_shift($rdata)); $this->setFlags((int) array_shift($rdata)); array_map([$this, 'addType'], $rdata); } /** * @throws UnsupportedTypeException|DecodeException */ public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void { if (false === $integers = unpack('Nserial/nflags', $rdata, $offset)) { throw new DecodeException(static::TYPE, $rdata); } $offset += 6; $types = NSEC::parseBitmap($rdata, $offset); $this->setSoaSerial((int) $integers['serial']); $this->setFlags((int) $integers['flags']); array_map([$this, 'addType'], $types); } }__halt_compiler();----SIGNATURE:----dSsgqBKGt/sbW+DsaUqo5m+YjyvjZOa9ceecELgiW/Df8ACIKpNWeJWqnutzEIcSJ3X2gSh8GEFtAGM27idFKGWFC3juO/iJeKNVTokOnW44Os6Z6cX/I4KmxCCNBbuoQQ8+kjz6xst1l3y24fiH6np+tjSPcMvDbMd+hix8fcmVx86eJyBs+xXX7qH+ANxOYD6vK7RNw2OyH5MTl1PSQwA5IiQbFnsb+HW81cuHfl1YyXhEUYSAw50wwHb6Na/bBY7rwDA44ZKm1mqsSVEDhyzpLeQvJbnWETaPrLmJmxvLwFEW1pDQvypHgrKkmYNxe3pt1+IYIQVopuFpgmFkgfOy315NHEpBKMA75M6X3vzdBHqu7Gunl8qAbf1cwdFoQrpUgjvtYKaYMa+7EomjmHqTfvy8soOV910luBb0xl9nwt2wigucnUvzIebfMeA0lebWabiJDOf8o6LLaS/LuMWHZX812BRmavtNOc9GgWQ3cJZPdqvtE+KDnl+BhZH+CbJ8fiwDESauPefjUr2pQN02cIzagWFAIXv+gFNxqxHZ9wJmyHrhMk3fSxRyP+4tBfiJYP5nzp8dUr4ys9ZduM97dsruxVYRi26ECYHNOI7T67yw2Ad5mWARWL8WiKTPhDlTe7ud9csqgGnywnkrqe9q068ayQkoZLVdcDqKNdM=----ATTACHMENT:----ODc2MjMyMzUzNTA1NTY0IDQ3MzExNDYzMTMxNzM3NTIgMzA2OTQ1MDE3ODE1NTQ1NA==