WordPress\AiClientDependencies\Nyholm\Psr7
ServerRequest::withParsedBody
Method of the class: ServerRequest{}
No Hooks.
Returns
static.
Usage
$ServerRequest = new ServerRequest(); $ServerRequest->withParsedBody( $data ): ServerRequestInterface;
- $data(required)
- .
ServerRequest::withParsedBody() ServerRequest::withParsedBody code WP 7.0
public function withParsedBody($data): ServerRequestInterface
{
if (!\is_array($data) && !\is_object($data) && null !== $data) {
throw new \InvalidArgumentException('First parameter to withParsedBody MUST be object, array or null');
}
$new = clone $this;
$new->parsedBody = $data;
return $new;
}