ApiResponse

Namespace

IO\Api

Properties
Type Name Description

array

$eventData

Dispatcher

$dispatcher

mixed

$data

array

$headers

Response

$response

NotificationService

$notificationService

Methods
public __construct($dispatcher, $response, $notificationService)

ApiResponse constructor.

Parameters

Type

Name

Description

Dispatcher

$dispatcher

Response

$response

NotificationService

$notificationService

public error($code, $message = null):ApiResponse
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Parameters

Type

Name

Description

int

$code

null

$message

public success($code, $message = null):ApiResponse
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Parameters

Type

Name

Description

int

$code

null

$message

public info($code, $message = null):ApiResponse
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Parameters

Type

Name

Description

int

$code

null

$message

Parameters

Type

Name

Description

string

$key

string

$value

public create($data, $code = \IO\Api\ResponseCode::OK, $headers = []): Response
Parameters

Type

Name

Description

array

$data

int

$code

array

$headers