Property | Type | Description | |
---|---|---|---|
$exceptionMap | array | Exception map |
Property | Type | Description | |
---|---|---|---|
$adapter | Phue\Transport\Adapter\AdapterInterface | Adapter | |
$client | Phue Client |
Method | Description | |
---|---|---|
__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 |
Method | Description | |
---|---|---|
getJsonResponse ( string $address, string $method = self::METHOD_GET, stdClass $body = null ) : stdClass | Send request |
public __construct ( |
||
$client |
public getAdapter ( ) : Phue\Transport\Adapter\AdapterInterface | ||
return | Phue\Transport\Adapter\AdapterInterface | Adapter |
public getExceptionByType ( string $type, string $description ) : Exception | ||
$type | string | Error type |
$description | string | Description of error |
return | 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 |
return | stdClass | Json body |
public setAdapter ( Phue\Transport\Adapter\AdapterInterface $adapter ) : self | ||
$adapter | Phue\Transport\Adapter\AdapterInterface | Transport adapter |
return | self | This object |
protected AdapterInterface,Phue\Transport\Adapter $adapter | ||
return | Phue\Transport\Adapter\AdapterInterface |