PHP Interface Elgg\Services\AjaxResponse

Since: 1.12.0
Afficher le fichier Open project: elgg/elgg Interface Usage Examples

Méthodes publiques

Méthode Description
cancel ( ) : self Cancel the response and send a 403 header
getData ( ) : stdClass Get the response data, which will be a stdClass object with property "value"
getTtl ( ) : integer Get the max-age for client caching
isCancelled ( ) : boolean Has the response been cancelled?
setData ( stdClass $data ) : self Set the response data
setTtl ( integer $ttl ) : self Set the max-age for client caching

Method Details

cancel() public méthode

Cancel the response and send a 403 header
public cancel ( ) : self
Résultat self

getData() public méthode

Get the response data, which will be a stdClass object with property "value"
public getData ( ) : stdClass
Résultat stdClass

getTtl() public méthode

Get the max-age for client caching
public getTtl ( ) : integer
Résultat integer

isCancelled() public méthode

Has the response been cancelled?
public isCancelled ( ) : boolean
Résultat boolean

setData() public méthode

Set the response data
public setData ( stdClass $data ) : self
$data stdClass Response data. Must be able to be encoded in JSON.
Résultat self

setTtl() public méthode

Set the max-age for client caching
public setTtl ( integer $ttl ) : self
$ttl integer Time to cache in seconds
Résultat self