Elgg  Version 2.3
ResponseBuilder.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Http;
4 
5 use InvalidArgumentException;
6 
12 interface ResponseBuilder {
13 
21  public function setContent($content = '');
22 
27  public function getContent();
28 
36  public function setStatusCode($status_code = ELGG_HTTP_OK);
37 
42  public function getStatusCode();
43 
51  public function setForwardURL($forward_url = REFERRER);
52 
57  public function getForwardURL();
58 
65  public function setHeaders(array $headers = []);
66 
71  public function getHeaders();
72 
77  public function isInformational();
78 
83  public function isSuccessful();
84 
89  public function isRedirection();
90 
95  public function isClientError();
96 
101  public function isServerError();
102 
107  public function isOk();
108 
113  public function isNotModified();
114 }
$content
Set robots.txt action.
Definition: set_robots.php:6
$headers
Definition: default.php:14
const ELGG_HTTP_OK
Definition: elgglib.php:2131
const REFERRER
Definition: elgglib.php:2113
if(! $entity->delete()) $forward_url
Definition: delete.php:37
HTTP response builder interface.
setStatusCode($status_code=ELGG_HTTP_OK)
Sets response HTTP status code.
isRedirection()
Check if response is redirection.
setHeaders(array $headers=[])
Sets additional response headers.
isSuccessful()
Check if response is successful.
getContent()
Returns response body.
setForwardURL($forward_url=REFERRER)
Sets redirect URL.
isInformational()
Check if response is informational.
getStatusCode()
Returns status code.
isOk()
Check if response is OK.
setContent($content='')
Sets response body.
getHeaders()
Returns additional response headers.
getForwardURL()
Returns redirect URL.
isNotModified()
Check if response has been modified.
isServerError()
Check if response is server error.
isClientError()
Check if response is client error.