data = $data; $this->length = $length; } public function __toString(): string { $result = parent::__toString(); if (null !== $this->length) { $result .= $this->length; } $result .= $this->data; return $result; } public function getValue(): string { return $this->data; } public function getLength(): int { return mb_strlen($this->data, 'utf8'); } public function getNormalizedData(bool $ignoreTags = false): string { return $this->data; } }