Elgg  Version 2.3
AjaxResponse.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg\Services;
3 
9 interface AjaxResponse {
10 
11  const RESPONSE_HOOK = 'ajax_response';
12 
19  public function setTtl($ttl = 0);
20 
26  public function getTtl();
27 
34  public function setData(\stdClass $data);
35 
41  public function getData();
42 
48  public function cancel();
49 
55  public function isCancelled();
56 }
isCancelled()
Has the response been cancelled?
setTtl($ttl=0)
Set the max-age for client caching.
$data
Definition: opendd.php:13
cancel()
Cancel the response and send a 403 header.
JSON endpoint response.
Definition: AjaxResponse.php:9
setData(\stdClass $data)
Set the response data.
getData()
Get the response data, which will be a stdClass object with property "value".
getTtl()
Get the max-age for client caching.