You are here

interface HttpClientFormatter in Http Client 7.2

Same name and namespace in other branches
  1. 6.2 includes/HttpClient.inc \HttpClientFormatter

Interface implemented by formatter implementations for the http client

Hierarchy

Expanded class hierarchy of HttpClientFormatter

All classes that implement HttpClientFormatter

1 string reference to 'HttpClientFormatter'
HttpClient::__construct in includes/HttpClient.inc
Creates a Http client.

File

includes/HttpClient.inc, line 482

View source
interface HttpClientFormatter {

  /**
   * Serializes arbitrary data to the implemented format.
   *
   * @param mixed $data
   *  The data that should be serialized.
   * @return string
   *  The serialized data as a string.
   */
  public function serialize($data);

  /**
   * Unserializes data in the implemented format.
   *
   * @param string $data
   *  The data that should be unserialized.
   * @return mixed
   *  The unserialized data.
   */
  public function unserialize($data);

  /**
   * Return the mime type that the formatter can parse.
   */
  public function accepts();

  /**
   * Return the content type form the data the formatter generates.
   */
  public function contentType();

}

Members

Namesort descending Modifiers Type Description Overrides
HttpClientFormatter::accepts public function Return the mime type that the formatter can parse. 3
HttpClientFormatter::contentType public function Return the content type form the data the formatter generates. 3
HttpClientFormatter::serialize public function Serializes arbitrary data to the implemented format. 3
HttpClientFormatter::unserialize public function Unserializes data in the implemented format. 3