ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MessageInterface.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\HTTP;
4 
13 interface MessageInterface {
14 
23  function getBodyAsStream();
24 
33  function getBodyAsString();
34 
42  function getBody();
43 
50  function setBody($body);
51 
59  function getHeaders();
60 
67  function hasHeader($name);
68 
85  function getHeader($name);
86 
98  function getHeaderAsArray($name);
99 
111  function setHeader($name, $value);
112 
124  function setHeaders(array $headers);
125 
137  function addHeader($name, $value);
138 
147  function addHeaders(array $headers);
148 
159  function removeHeader($name);
160 
169  function setHttpVersion($version);
170 
176  function getHttpVersion();
177 
178 }
setHeaders(array $headers)
Sets a new set of HTTP headers.
setBody($body)
Updates the body resource with a new stream.
getHeaderAsArray($name)
Returns a HTTP header as an array.
setHttpVersion($version)
Sets the HTTP version.
getBodyAsString()
Returns the body as a string.
getBodyAsStream()
Returns the body as a readable stream resource.
$version
Definition: build.php:27
getHeaders()
Returns all the HTTP headers as an array.
addHeader($name, $value)
Adds a HTTP header.
removeHeader($name)
Removes a HTTP header.
hasHeader($name)
Will return true or false, depending on if a HTTP header exists.
getHeader($name)
Returns a specific HTTP header, based on it&#39;s name.
The MessageInterface is the base interface that&#39;s used by both the RequestInterface and ResponseInter...
getHttpVersion()
Returns the HTTP version.
setHeader($name, $value)
Updates a HTTP header.
getBody()
Returns the message body, as it&#39;s internal representation.
addHeaders(array $headers)
Adds a new set of HTTP headers.