You are here

interface HttpHeaderInterface in RESTful 7.2

Hierarchy

Expanded class hierarchy of HttpHeaderInterface

All classes that implement HttpHeaderInterface

File

src/Http/HttpHeaderInterface.php, line 10
Contains \Drupal\restful\Http\HttpHeaderInterface

Namespace

Drupal\restful\Http
View source
interface HttpHeaderInterface {

  /**
   * Creates a header object from the key and value strings.
   *
   * @param string $key
   *   The header name.
   * @param string $value
   *   The header value.
   *
   * @return HttpHeaderInterface
   *   The parsed header.
   */
  public static function create($key, $value);

  /**
   * Gets the values of the header.
   *
   * @return array
   *   The values for this header.
   */
  public function get();

  /**
   * Gets the contents of the header.
   *
   * @return string
   *   The header value as a string.
   */
  public function getValueString();

  /**
   * Gets the header name.
   *
   * @return string
   */
  public function getName();

  /**
   * Sets the values.
   *
   * @param array $values
   *   A numeric array containing all the values for the given header.
   */
  public function set($values);

  /**
   * Appends a value into a header.
   *
   * @param string $value
   *   The string value to append.
   */
  public function append($value);

  /**
   * Gets the header id.
   *
   * @return string
   *   The header ID.
   */
  public function getId();

  /**
   * Generates the header ID based on the header name.
   *
   * @param string $name
   *   The header name.
   *
   * @return string
   *   The ID.
   */
  public static function generateId($name);

}

Members

Namesort descending Modifiers Type Description Overrides
HttpHeaderInterface::append public function Appends a value into a header. 2
HttpHeaderInterface::create public static function Creates a header object from the key and value strings. 2
HttpHeaderInterface::generateId public static function Generates the header ID based on the header name. 2
HttpHeaderInterface::get public function Gets the values of the header. 2
HttpHeaderInterface::getId public function Gets the header id. 2
HttpHeaderInterface::getName public function Gets the header name. 2
HttpHeaderInterface::getValueString public function Gets the contents of the header. 2
HttpHeaderInterface::set public function Sets the values. 2