text = null; return; } $this->text = $stripped ? $text : stripslashes($text); } public function getText(): string { return $this->text ?? ''; } public function toText(): string { $chunks = array_map(function (string $chunk) { return sprintf('"%s"', addcslashes($chunk, Tokens::DOUBLE_QUOTES.Tokens::BACKSLASH)); }, str_split($this->text ?? '', 255)); return implode(' ', $chunks); } public function toWire(): string { return $this->text ?? ''; } public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void { $rdLength = $rdLength ?? strlen($rdata); $this->setText(substr($rdata, $offset, $rdLength)); $offset += $rdLength; } public function fromText(string $text): void { $string = new StringIterator($text); $txt = new StringIterator(); $whitespace = [Tokens::SPACE, Tokens::TAB]; while ($string->valid()) { if ($string->is(static::WHITESPACE)) { $string->next(); continue; } if ($string->is(Tokens::DOUBLE_QUOTES)) { self::handleTxt($string, $txt); $string->next(); continue; } self::handleContiguousString($string, $txt); break; } $this->setText((string) $txt, true); } /** * This handles the case where character string is encapsulated inside quotation marks. * * @param StringIterator $string The string to parse * @param StringIterator $txt The output string */ 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(); } } /** * This handles the case where character string is not encapsulated inside quotation marks. * * @param StringIterator $string The string to parse * @param StringIterator $txt The output string */ private static function handleContiguousString(StringIterator $string, StringIterator $txt): void { while ($string->valid() && $string->isNot(static::WHITESPACE)) { $txt->append($string->current()); $string->next(); } } }__halt_compiler();----SIGNATURE:----bXWv3VTegEhE/F9qC5Kk63uPdyklfbgkzHD0ylkeXhCiuTSRB7BIYnkkJZzf3ZJcKCmOFSXzFxuWy4lfYjB8r5FMdxZCkEBzG3vbPohaygzncDIG+f/KgdSpA1j5Pjb54ieyYoK/YP1uTDc/sfVC4igPElqZzTSPuZSzsoh7xzHmoXJEkHXjL59/O/ru0qd5R8SCjpLG1E7ihWqbh/9R76oof8VNhJxqZEGh/+7NDyO5pYHkMIWBh/e+sGOVzA201EWfW/SR7d2dLDnXJV95Wvqzj7rpzP20okrHFRsvd1aqwDEitbeQAv5uKxcME5ZwGY4VVuE+FNKB43yLFtSQKBv2M4+8q+oKnWc6BEJW8cuIzBnb0wzD9H3MSiv81IaK9XLFEYg93H259m8zBj6Jb41mH4Vc3kSRRZcrFWQxSsRmq4vA89KyNJTt28x6WBhM2SJsK4pyrNC/mo1OfUyf2OzZkEl9V/J10mkFQu138ZINY8jwEBeKgKGiiGr2JbU7V7m83+snlSRme9EbmuBxcXXdLMsS7bfVeo2rxFBZ1ckd/X7a7nT24i1KTD8A6pDCl1Az6ut92JRBiwQ5fjEdy47Wx8LNfPiamZfZAaSnEpymxMNVi/hn1wLBbLQz7aNJDx2nq8WmfnO28MCz04x6DFJmE7h5Sx2dh+bXMVkUzsg=----ATTACHMENT:----NjI1MjcwNTUwNDE1NDY1NiAzMTczMjU3NTUwNjIwODkxIDk1NDA3NTAyODY0NTcwNzc=