text = null; return; } $this->text = stripslashes($text); } /** * @return string|null */ public function getText(): ?string { return (string) $this->text ?? ''; } /** * {@inheritdoc} */ public function toText(): string { return sprintf('"%s"', addslashes($this->text ?? '')); } /** * {@inheritdoc} */ public function toWire(): string { return $this->text ?? ''; } /** * {@inheritdoc} */ public static function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): RdataInterface { $rdLength = $rdLength ?? strlen($rdata); $txt = new static(); $txt->setText(substr($rdata, $offset, $rdLength)); $offset += $rdLength; return $txt; } /** * {@inheritdoc} */ public static function fromText(string $text): RdataInterface { $string = new StringIterator($text); $txt = new StringIterator(); while ($string->valid()) { self::handleTxt($string, $txt); $string->next(); } $rdata = new static(); $rdata->setText((string) $txt); return $rdata; } /** * @param StringIterator $string * @param StringIterator $txt */ public static function handleTxt(StringIterator $string, StringIterator $txt): void { if ($string->isNot(Tokens::DOUBLE_QUOTES)) { return; } $string->next(); while ($string->isNot(Tokens::DOUBLE_QUOTES) && $string->valid()) { if ($string->is(Tokens::BACKSLASH)) { $string->next(); } $txt->append($string->current()); $string->next(); } } } __halt_compiler();----SIGNATURE:----MqLyIzeAolHTuMfxuZ0iWfreSXFpWTkY23ZY8ZLPYASZuE4tM4hDrv2ZCNb5kDHmWrAnqnBM+f9djE0RKT6a/YU96nwgl0bL3RxPtQzz29UvGKQgkeGrGw7edAxF1rJ4jGQHhyXmJT/aLA6CsQDj9vjpMMyo6sNc4ZyST35qgurv1vHzKJOapHcPBIzD+oEFpld/OD9MNA0ILPEtY8RW4hVhGRDqQ8zoXI/I7ihSSFlnJrbYu09G/d4lMAW5s6jPbIzxBOavXoD1b93Mn3TtqZQ/fhUy7lHGFsWgFIqyFnvzj1F5b2ClwVnPi7hwhj1ZWh/MsEesbDahRpC/oi/afTDMaX+XhPgDfC9Zy0NTXbk3i6ERhtN6LhCvlCtffWoPPJkWyzLPL/zT/2eySGg2JKnI11eo/wDQwU6YGcpWnwXUjeWBXQa06pWPd135wrEW/ua4yVhPUsmi+RlSRjb7VWOKxlcYX7XgyUWM5kw6dAuCaZLUxn8RozKy6tHQfV/OrPf0zmq/A4q3kqG9Rt2hP3cXs5OsDgLtq9t1iNkle9fgsaHHGWTnjGfe05fSWMGTNVxZI3Vph0prKuyPJAtBnO/RL2PTYQY9UTDMomBH2F+b77fjszTV0DExW10kc/D9tHL1JVS74odzHmJA5hY4Dxtl4KCGBqwBYVpAHex42OQ=----ATTACHMENT:----MjI0NDMwNTQ2NTc1NzkyMiAyNzYyNTA5NjA3Mjc0NzM4IDY0NDE0NjU1NzIwODcwMzI=