MyAllocator PMS PHP SDK
  • Namespace
  • Class
  • Tree

Namespaces

  • MyAllocator
    • phpsdk
      • src
        • Api
        • Exception
        • Object
        • Util
  • PHP

Classes

  • Common
  • Requestor

Class Requestor

The Requestor class is responsible for preparing and sending an API reqest, as well as parsing and handling the response.

MyAllocator\phpsdk\src\MaBaseClass
Extended by MyAllocator\phpsdk\src\Util\Requestor
Namespace: MyAllocator\phpsdk\src\Util
Located at Util/Requestor.php

Methods summary

public
# __construct( array $cfg = null )

The constructor passes potential configuration parameters to MaBaseClass.

The constructor passes potential configuration parameters to MaBaseClass.

Parameters

$cfg
API configuration parameters.

Overrides

MyAllocator\phpsdk\src\MaBaseClass::__construct
public mixed
# request( string $method, string $url, array|null $params = null )

Send an API request, interpret and return the response.

Send an API request, interpret and return the response.

Parameters

$method
HTTP method.
$url
API endpoint.
$params
API parameters.

Returns

mixed
API response, code, headers (XML only).

Throws

MyAllocator\phpsdk\src\Exception\ApiException
public static string
# utf8( string $value )

Convert a string to UTF-8 encoding.

Convert a string to UTF-8 encoding.

Parameters

$value
The string to encode.

Returns

string
The UTF-8 encoded string.
public static string
# encode( array $arr, string $prefix = null )

URL encode URL array parameters.

URL encode URL array parameters.

Parameters

$arr
The array to encode.
$prefix
A key prefix.

Returns

string
The URL encoded string.

Methods inherited from MyAllocator\phpsdk\src\MaBaseClass

debug(), debug_echo(), debug_print_r(), debug_var_dump(), getConfig(), setConfig()

Magic methods summary

Properties summary

public string $version

The API version.

The API version.

# '201408'
public array $state

Request and response state data.

Request and response state data.

# array( 'method' => null, 'request' => array(), // time, body 'response' => array() // time, code, headers, body, body_raw )

Properties inherited from MyAllocator\phpsdk\src\MaBaseClass

$config

MyAllocator PMS PHP SDK API documentation generated by ApiGen