You are here

public function Formatter::parseBody in RESTful 7.2

Parses the body string into the common format.

Parameters

string $body: The string sent from the consumer.

Return value

array The parsed object following the expected structure.

Throws

\Drupal\restful\Exception\ServerConfigurationException

\Drupal\restful\Exception\BadRequestException

Overrides FormatterInterface::parseBody

2 methods override Formatter::parseBody()
FormatterJson::parseBody in src/Plugin/formatter/FormatterJson.php
Parses the body string into the common format.
FormatterJsonApi::parseBody in src/Plugin/formatter/FormatterJsonApi.php
Parses the body string into the common format.

File

src/Plugin/formatter/Formatter.php, line 88
Contains \Drupal\restful\Plugin\formatter\Formatter

Class

Formatter
Class Formatter.

Namespace

Drupal\restful\Plugin\formatter

Code

public function parseBody($body) {
  throw new ServerConfigurationException(sprintf('Invalid body parser for: %s.', $body));
}