Elgg  Version 2.3
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_HOOK = 'ajax_response'
 

Detailed Description

JSON endpoint response.

Since
1.12.0 private

Definition at line 11 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 53 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 46 of file Response.php.

Elgg\Ajax\Response::getTtl ( )

{Get the max-age for client caching.

Returns
int
}

Implements Elgg\Services\AjaxResponse.

Definition at line 28 of file Response.php.

Elgg\Ajax\Response::isCancelled ( )

{Has the response been cancelled?

Returns
bool
}

Implements Elgg\Services\AjaxResponse.

Definition at line 61 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 35 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 20 of file Response.php.


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