This commit is contained in:
2023-10-08 15:33:14 +08:00
parent 1dd7fe5bb8
commit 4ea8a8c2e4
+13
View File
@@ -310,6 +310,19 @@ class Request implements ServerRequestInterface
return $this->__call__(__FUNCTION__, $name);
}
/**
* @return array
*/
public function all(): array
{
$data = $this->getParsedBody();
if (is_array($data)) {
return $data;
}
return [];
}
/**
* Gets the body of the message.
*