types[] = $type; } /** * Clears the types from the RDATA. */ public function clearTypes(): void { $this->types = []; } /** * @return array */ public function getTypes(): array { return $this->types; } /** * @return int */ public function getSoaSerial(): int { return $this->soaSerial; } /** * @param int $soaSerial */ public function setSoaSerial(int $soaSerial): void { $this->soaSerial = $soaSerial; } /** * @return int */ public function getFlags(): int { return $this->flags; } /** * @param int $flags */ public function setFlags(int $flags): void { $this->flags = $flags; } /** * {@inheritdoc} */ public function toText(): string { return sprintf('%d %d %s', $this->soaSerial, $this->flags, implode(Tokens::SPACE, $this->types)); } /** * {@inheritdoc} * * @throws UnsupportedTypeException */ public function toWire(): string { return pack('Nn', $this->soaSerial, $this->flags).NSEC::renderBitmap($this->types); } /** * {@inheritdoc} */ public static function fromText(string $text): RdataInterface { $rdata = explode(Tokens::SPACE, $text); $csync = new static(); $csync->setSoaSerial((int) array_shift($rdata)); $csync->setFlags((int) array_shift($rdata)); array_map([$csync, 'addType'], $rdata); return $csync; } /** * {@inheritdoc} * * @throws UnsupportedTypeException */ public static function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): RdataInterface { $integers = unpack('Nserial/nflags', $rdata, $offset); $offset += 6; $types = NSEC::parseBitmap($rdata, $offset); $csync = new static(); $csync->setSoaSerial((int) $integers['serial']); $csync->setFlags((int) $integers['flags']); array_map([$csync, 'addType'], $types); return $csync; } } __halt_compiler();----SIGNATURE:----x8uH+0+EtECYngOC2/C3WyuOLrq9BapUM4JZAWmDQx0EdSsghfMaMxPRXoHgyU6J/ty8aSuL6ZRJuPlWYefta07nTNN4HAqLVObxzx4XqsQ6OpC6EuuB94oh+15P7sATha236zf4hj3XnsK5KFlTHopHq6Od8x7GQ9f1oSw2j4IvHz1x5k9SpMoTEyg00eTxXd5NZubYBM0DJ/ZJl5LpVkKaGq9l5Au/n2cqBcbYbuJsG1gGRiJNW93zWrkE9T/cNKrvWnjb+MtG30WROdkNNBWPZMSlzL8Kt9r8+4l9k3E2s347J1P5iaELh3Xnz/xULTXVbb6eWKZ2dqSwy86OYoCxZuyfKmp6LYmFGkWwEdxv+LSGBs3QgvpJrTUm90pzfp1Vf4p18eS2cxn9j8IOcvTnykwIoa1Lz5P2eWrn+a217ygtmqgtpD0MWhkcZytmf+WOVoTXuaTVcgEe5KBZ0XgClmsJmtWIJEGD4RW6jbUBFyzizdYbGaCSLU4fwoh+wjAOFhAKJpublBxaugKMDVmbkfxzz6/y9cJK/OFn5+TI0vNw7GI9OUmrtIpO9Z6l3lCp+SPVSGLGpF/gNFAWn8hMY3rOEDwPnxB3TK2fKl+zKuzsERzpxEg/1qV3SsUdUMN96/gD7gwL7gcJDFhQ+TJQgDuWtBMlO0F7Ocx91IE=----ATTACHMENT:----MzA5NTAyMzQxODIwNjIyMiA4MDYwMjQzMzE3MTc4OTQ2IDIwOTM4NjQ4NDM3MDU2NTc=