ServerRequest::withParsedBody( $data ): static

In this article

Return

static

Source

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;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.