ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MessageDecoratorTrait.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\HTTP;
4 
17 
25  protected $inner;
26 
35  function getBodyAsStream() {
36 
37  return $this->inner->getBodyAsStream();
38 
39  }
40 
49  function getBodyAsString() {
50 
51  return $this->inner->getBodyAsString();
52 
53  }
54 
62  function getBody() {
63 
64  return $this->inner->getBody();
65 
66  }
67 
74  function setBody($body) {
75 
76  $this->inner->setBody($body);
77 
78  }
79 
87  function getHeaders() {
88 
89  return $this->inner->getHeaders();
90 
91  }
92 
99  function hasHeader($name) {
100 
101  return $this->inner->hasHeader($name);
102 
103  }
104 
121  function getHeader($name) {
122 
123  return $this->inner->getHeader($name);
124 
125  }
126 
139 
140  return $this->inner->getHeaderAsArray($name);
141 
142  }
143 
155  function setHeader($name, $value) {
156 
157  $this->inner->setHeader($name, $value);
158 
159  }
160 
172  function setHeaders(array $headers) {
173 
174  $this->inner->setHeaders($headers);
175 
176  }
177 
189  function addHeader($name, $value) {
190 
191  $this->inner->addHeader($name, $value);
192 
193  }
194 
203  function addHeaders(array $headers) {
204 
205  $this->inner->addHeaders($headers);
206 
207  }
208 
209 
220  function removeHeader($name) {
221 
222  return $this->inner->removeHeader($name);
223 
224  }
225 
235 
236  $this->inner->setHttpVersion($version);
237 
238  }
239 
245  function getHttpVersion() {
246 
247  return $this->inner->getHttpVersion();
248 
249  }
250 
251 }
removeHeader($name)
Removes a HTTP header.
getHeaderAsArray($name)
Returns a HTTP header as an array.
getBody()
Returns the message body, as it&#39;s internal representation.
getHeaders()
Returns all the HTTP headers as an array.
getHeader($name)
Returns a specific HTTP header, based on it&#39;s name.
addHeaders(array $headers)
Adds a new set of HTTP headers.
$version
Definition: build.php:27
setHeader($name, $value)
Updates a HTTP header.
addHeader($name, $value)
Adds a HTTP header.
getHttpVersion()
Returns the HTTP version.
getBodyAsString()
Returns the body as a string.
getBodyAsStream()
Returns the body as a readable stream resource.
setHeaders(array $headers)
Sets a new set of HTTP headers.
setHttpVersion($version)
Sets the HTTP version.
hasHeader($name)
Will return true or false, depending on if a HTTP header exists.
setBody($body)
Updates the body resource with a new stream.