|
|
|
@ -26,31 +26,52 @@ class Response
@@ -26,31 +26,52 @@ class Response
|
|
|
|
|
|
|
|
|
|
if ($code >= 10 && $code <= 69) |
|
|
|
|
{ |
|
|
|
|
$this->_code = $match['code']; |
|
|
|
|
$this->setCode( |
|
|
|
|
$code |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset($match['meta']) && mb_strlen($match['meta']) <= 1024) |
|
|
|
|
{ |
|
|
|
|
$this->_meta = (string) $match['meta']; |
|
|
|
|
$this->setMeta( |
|
|
|
|
(string) $match['meta'] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset($match['body'])) |
|
|
|
|
{ |
|
|
|
|
$this->_body = (string) $match['body']; |
|
|
|
|
$this->setBody( |
|
|
|
|
(string) (string) $match['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; |
|
|
|
|