Elgg  Version 3.0
ResponseBuilder.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Http;
4 
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 }
HTTP response builder interface.
if(!$entity->delete()) $forward_url
Definition: delete.php:30
getStatusCode()
Returns status code.
isRedirection()
Check if response is redirection.
getContent()
Returns response body.
const ELGG_HTTP_OK
Definition: constants.php:60
isNotModified()
Check if response has been modified.
isOk()
Check if response is OK.
isInformational()
Check if response is informational.
isServerError()
Check if response is server error.
const REFERRER
Definition: constants.php:42
isSuccessful()
Check if response is successful.
isClientError()
Check if response is client error.
setForwardURL($forward_url=REFERRER)
Sets redirect URL.
$content
Set robots.txt action.
Definition: set_robots.php:6
setHeaders(array $headers=[])
Sets additional response headers.
setContent($content= '')
Sets response body.
getHeaders()
Returns additional response headers.
getForwardURL()
Returns redirect URL.
setStatusCode($status_code=ELGG_HTTP_OK)
Sets response HTTP status code.