MyAllocator BuildToUs API PHP SDK for OTA's
  • Namespace
  • Class
  • Tree

Namespaces

  • MyAllocator
    • phpsdkota
      • src
        • Api
          • Inbound
        • Object

Classes

  • MaError
  • MaResponse

Class MaResponse

Namespace: MyAllocator\phpsdkota\src\Object
Located at Object/MaResponse.php

Methods summary

public
# __construct( MyAllocator\phpsdkota\src\Api\Inbound\MaInboundInterface $logger = null )

Class contructor.

Class contructor.

Parameters

$logger
<p>$interface The object implementing MaInboundInterface to invoke backend functionality.</p>
public MyAllocator\phpsdkota\src\Object\MaResponse
# success( mixed $data = null )

Set response to success and return an object response.

Set response to success and return an object response.

Parameters

$data
Data to return in successful response.

Returns

MyAllocator\phpsdkota\src\Object\MaResponse
Response object.
public MyAllocator\phpsdkota\src\Object\MaResponse
# error( integer $id, string $data = null )

Add an error to the response object.

Add an error to the response object.

Parameters

$id
$error The Error code.
$data
$msg Custom error message.

Returns

MyAllocator\phpsdkota\src\Object\MaResponse
Response object.
public array
# response( )

Return array response.

Return array response.

Returns

array
Response array.
public array
# toArray( )

Convert response object to an array.

Convert response object to an array.

Returns

array
Response array.
public array
# setLogger( MyAllocator\phpsdkota\src\Api\Inbound\MaInboundInterface $logger )

Set interface for logging.

Set interface for logging.

Returns

array
Response array.

Magic methods summary

Properties summary

public boolean $success

The result: true = success, false = error

The result: true = success, false = error

# true
public boolean $data

Data to be returned.

Data to be returned.

# null
public array $errors

Array of errors. [{id:'', type:'', msg:''}, ...]

Array of errors. [{id:'', type:'', msg:''}, ...]

# array()
protected array $logger

Interface to OTA backend. Only used for logging here.

Interface to OTA backend. Only used for logging here.

# null
MyAllocator BuildToUs API PHP SDK for OTA's API documentation generated by ApiGen