Docs Goabase

AjaxResponseHandler
in package

Read onlyYes
FinalYes

Handles AJAX responses, specifically JSON and string responses, and manages allowed actions for AJAX calls. This class validates actions and processes the output data, ensuring certain formats and links are properly handled.

Table of Contents

Constants

ALLOWED_EMPTY_ACTIONS  = ['breakoutscore', 'checkName', 'del-data-img', 'del-inform-list', 'del-invites', 'del-partytimer', 'del-savedsearch', 'informRead', 'linkbase', 'memberlist', 'partysearchsum', 'postAnswer', 'tarot']

Properties

$ajaxLink  : AjaxLink
$input  : Input

Methods

__construct()  : mixed
outputAjax()  : void
Processes and outputs AJAX responses based on the provided data and action.
handleJsonResponse()  : bool
handleStringResponse()  : bool
logInvalidAction()  : void

Constants

ALLOWED_EMPTY_ACTIONS

private mixed ALLOWED_EMPTY_ACTIONS = ['breakoutscore', 'checkName', 'del-data-img', 'del-inform-list', 'del-invites', 'del-partytimer', 'del-savedsearch', 'informRead', 'linkbase', 'memberlist', 'partysearchsum', 'postAnswer', 'tarot']

Properties

Methods

outputAjax()

Processes and outputs AJAX responses based on the provided data and action.

public outputAjax(array<string|int, mixed>|null $jsonData, mixed $stringData, string $action) : void
Parameters
$jsonData : array<string|int, mixed>|null

An optional array containing JSON-encoded response data.

$stringData : mixed

The response data as a string or a mixed type.

$action : string

The action identifier for processing the response.

Return values
void

This method does not return a value.

handleJsonResponse()

private handleJsonResponse(array<string|int, mixed>|null $jsonData) : bool
Parameters
$jsonData : array<string|int, mixed>|null
Return values
bool

handleStringResponse()

private handleStringResponse(mixed $stringData) : bool
Parameters
$stringData : mixed
Return values
bool

logInvalidAction()

private logInvalidAction(string $action) : void
Parameters
$action : string

        
On this page

Search results