\d{2})(?.*)$/m', $data, $match ); if (isset($match['code'])) { $code = (int) $match['code']; if ($code >= 10 && $code <= 69) { $this->setCode( $code ); } } if (isset($match['meta']) && mb_strlen($match['meta']) <= 1024) { $this->setMeta( trim( (string) $match['meta'] ) ); } if ($body = substr($data, strpos($data, chr(10)) + 1)) { $this->setBody( (string) $body ); } } } public function setCode(?int $value): void { $this->_code = $value; } public function getCode(): ?int { return $this->_code; } public function setMeta(?string $value): void { $this->_meta = $value; } public function getMeta(): ?string { return $this->_meta; } public function setBody(?string $value): void { $this->_body = $value; } public function getBody(): ?string { return $this->_body; } }