You are here

interface HttpHeaderBagInterface in RESTful 7.2

Hierarchy

Expanded class hierarchy of HttpHeaderBagInterface

All classes that implement HttpHeaderBagInterface

File

src/Http/HttpHeaderBagInterface.php, line 12
Contains \Drupal\restful\Http\HttpHeaderBagInterface.

Namespace

Drupal\restful\Http
View source
interface HttpHeaderBagInterface {

  /**
   * Get the the header object for a header name or ID.
   *
   * @param string $key
   *   The header ID or header name.
   *
   * @return HttpHeaderInterface
   *   The header object.
   */
  public function get($key);

  /**
   * Checks the existence of a header in the bag.
   *
   * @param string $key
   *   The header ID or header name.
   *
   * @return bool
   *   TRUE if the header is present. FALSE otherwise.
   */
  public function has($key);

  /**
   * Returns all the headers set on the bag.
   *
   * @return array
   */
  public function getValues();

  /**
   * Add a header to the bag.
   *
   * @param HttpHeaderInterface $header
   *   The header object or an associative array with the name and value.
   *
   * @throws ServerConfigurationException
   */
  public function add(HttpHeaderInterface $header);

  /**
   * Appends the values of the passed in header to if the header already exists.
   *
   * @param HttpHeaderInterface $header
   *   The header object or an associative array with the name and value.
   *
   * @throws ServerConfigurationException
   */
  public function append(HttpHeaderInterface $header);

  /**
   * Removes a header from the bag.
   *
   * @param string $key
   *   The header ID or the header name.
   */
  public function remove($key);

}

Members

Namesort descending Modifiers Type Description Overrides
HttpHeaderBagInterface::add public function Add a header to the bag. 1
HttpHeaderBagInterface::append public function Appends the values of the passed in header to if the header already exists. 1
HttpHeaderBagInterface::get public function Get the the header object for a header name or ID. 1
HttpHeaderBagInterface::getValues public function Returns all the headers set on the bag. 1
HttpHeaderBagInterface::has public function Checks the existence of a header in the bag. 1
HttpHeaderBagInterface::remove public function Removes a header from the bag. 1