Elgg  Version 2.3
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:37
getStatusCode()
Returns status code.
isRedirection()
Check if response is redirection.
getContent()
Returns response body.
$headers
Definition: default.php:14
isNotModified()
Check if response has been modified.
isOk()
Check if response is OK.
const REFERRER
Definition: elgglib.php:2113
isInformational()
Check if response is informational.
isServerError()
Check if response is server error.
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
const ELGG_HTTP_OK
Definition: elgglib.php:2131
setHeaders(array $headers=[])
Sets additional response headers.
setContent($content= '')
Sets response body.
getHeaders()
Returns additional response headers.
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:5
getForwardURL()
Returns redirect URL.
setStatusCode($status_code=ELGG_HTTP_OK)
Sets response HTTP status code.