You are here

public function RestfulFormatterBase::format in RESTful 7

Formats the un-structured data into the output format.

Parameters

array $data: The raw data to return.

Return value

string The body contents for the HTTP response.

Overrides RestfulFormatterInterface::format

See also

\RestfulFormatterInterface::prepare()

\RestfulFormatterInterface::render()

File

plugins/formatter/RestfulFormatterBase.php, line 32
Contains RestfulFormatterBase.

Class

RestfulFormatterBase
@file Contains RestfulFormatterBase.

Code

public function format(array $data) {
  return $this
    ->render($this
    ->prepare($data));
}