Elgg  Version 6.1
Public Member Functions | List of all members
Elgg\Ajax\Response Class Reference

JSON endpoint response. More...

Inheritance diagram for Elgg\Ajax\Response:
Elgg\Services\AjaxResponse

Public Member Functions

 setTtl ($ttl=0)
 {Set the max-age for client caching.
Parameters
int$ttlTime to cache in seconds
Returns
self
} More...
 
 getTtl ()
 {Get the max-age for client caching.
Returns
int
} More...
 
 setData (\stdClass $data)
 {Set the response data.
Parameters
\stdClass$dataResponse data. Must be able to be encoded in JSON.
Returns
self
} More...
 
 getData ()
 {Get the response data, which will be a stdClass object with property "value".
Returns
} More...
 
 cancel ()
 {Cancel the response and send a 403 header.
Returns
self
} More...
 
 isCancelled ()
 {Has the response been cancelled?
Returns
bool
} More...
 

Additional Inherited Members

- Public Attributes inherited from Elgg\Services\AjaxResponse
const RESPONSE_EVENT = 'ajax_response'
 

Detailed Description

JSON endpoint response.

Since
1.12.0

Definition at line 13 of file Response.php.

Member Function Documentation

Elgg\Ajax\Response::cancel ( )

{Cancel the response and send a 403 header.

Returns
self
}

Implements Elgg\Services\AjaxResponse.

Definition at line 58 of file Response.php.

Elgg\Ajax\Response::getData ( )

{Get the response data, which will be a stdClass object with property "value".

Returns
}

Implements Elgg\Services\AjaxResponse.

Definition at line 51 of file Response.php.

Elgg\Ajax\Response::getTtl ( )

{Get the max-age for client caching.

Returns
int
}

Implements Elgg\Services\AjaxResponse.

Definition at line 32 of file Response.php.

Elgg\Ajax\Response::isCancelled ( )

{Has the response been cancelled?

Returns
bool
}

Implements Elgg\Services\AjaxResponse.

Definition at line 66 of file Response.php.

Elgg\Ajax\Response::setData ( \stdClass  $data)

{Set the response data.

Parameters
\stdClass$dataResponse data. Must be able to be encoded in JSON.
Returns
self
}

Implements Elgg\Services\AjaxResponse.

Definition at line 39 of file Response.php.

Elgg\Ajax\Response::setTtl (   $ttl = 0)

{Set the max-age for client caching.

Parameters
int$ttlTime to cache in seconds
Returns
self
}

Implements Elgg\Services\AjaxResponse.

Definition at line 24 of file Response.php.


The documentation for this class was generated from the following file: