You are here

public function Request::getParsedBody in RESTful 7.2

Parses the body string.

Return value

array The parsed body.

Overrides RequestInterface::getParsedBody

File

src/Http/Request.php, line 238
Contains \Drupal\restful\Http\Request

Class

Request
Deals with everything coming from the consumer.

Namespace

Drupal\restful\Http

Code

public function getParsedBody() {
  if ($this->parsedBody) {
    return $this->parsedBody;
  }

  // Find out the body format and parse it into the \ArrayObject.
  $this->parsedBody = $this
    ->parseBody($this->method);
  return $this->parsedBody;
}