Свойство | Тип | Описание | |
---|---|---|---|
$exceptionMap | array | Exception map |
Свойство | Тип | Описание | |
---|---|---|---|
$adapter | Phue\Transport\Adapter\AdapterInterface | Adapter | |
$client | Phue Client |
Метод | Описание | |
---|---|---|
__construct ( |
Construct Http transport | |
getAdapter ( ) : Phue\Transport\Adapter\AdapterInterface | Get adapter for transport | |
getExceptionByType ( string $type, string $description ) : Exception | Get exception by type | |
sendRequest ( string $address, string $method = self::METHOD_GET, stdClass $body = null ) : string | Send request | |
sendRequestBypassBodyValidation ( string $address, string $method = self::METHOD_GET, stdClass $body = null ) : string | Send request, bypass body validation | |
setAdapter ( Phue\Transport\Adapter\AdapterInterface $adapter ) : self | Set adapter |
Метод | Описание | |
---|---|---|
getJsonResponse ( string $address, string $method = self::METHOD_GET, stdClass $body = null ) : stdClass | Send request |
public __construct ( |
||
$client |
public getAdapter ( ) : Phue\Transport\Adapter\AdapterInterface | ||
Результат | Phue\Transport\Adapter\AdapterInterface | Adapter |
public getExceptionByType ( string $type, string $description ) : Exception | ||
$type | string | Error type |
$description | string | Description of error |
Результат | Exception | Built exception |
protected getJsonResponse ( string $address, string $method = self::METHOD_GET, stdClass $body = null ) : stdClass | ||
$address | string | API address |
$method | string | Request method |
$body | stdClass | Post body |
Результат | stdClass | Json body |
public setAdapter ( Phue\Transport\Adapter\AdapterInterface $adapter ) : self | ||
$adapter | Phue\Transport\Adapter\AdapterInterface | Transport adapter |
Результат | self | This object |
protected AdapterInterface,Phue\Transport\Adapter $adapter | ||
Результат | Phue\Transport\Adapter\AdapterInterface |
public static array $exceptionMap | ||
Результат | array |