PHP Класс Dwolla\RestClient

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$client Placeholder for Guzzle REST client.
$settings Settings object.

Открытые методы

Метод Описание
__construct ( ) Constructor. Takes no arguments.
__get ( $name ) PHP "magic" getter.
__set ( $name, $value ) PHP "magic" setter.

Защищенные методы

Метод Описание
_console ( $data ) Echos output and logs to console (and js console to make browser debugging easier).
_delete ( string $endpoint, string[] $query, boolean $customPostfix = false, boolean $dwollaParse = true ) : string[] Wrapper around Guzzle DELETE request.
_error ( string $message ) : boolean Small error message wrapper for missing parameters, etc.
_get ( string $endpoint, string[] $query, boolean $customPostfix = false, boolean $dwollaParse = true ) : string[] Wrapper around Guzzle GET request.
_host ( ) : string Returns default host URL dependent on sandbox flag.
_logtofile ( $data ) Logs console messages to file for convenience.
_post ( string $endpoint, string $request, boolean $customPostfix = false, boolean $dwollaParse = true ) : String[] Wrapper around Guzzle POST request.
_put ( string $endpoint, string $request, boolean $customPostfix = false, boolean $dwollaParse = true ) : String[] Wrapper around Guzzle PUT request.

Приватные методы

Метод Описание
_dwollaparse ( String[] $response ) : String[] Parses API response out of envelope and informs user of issues if they arise.

Описание методов

__construct() публичный Метод

Constructor. Takes no arguments.
public __construct ( )

__get() публичный Метод

PHP "magic" getter.
public __get ( $name )
$name

__set() публичный Метод

PHP "magic" setter.
public __set ( $name, $value )
$name
$value

_console() защищенный Метод

Echos output and logs to console (and js console to make browser debugging easier).
protected _console ( $data )
$data {???} Can be anything.

_delete() защищенный Метод

Wrapper around Guzzle DELETE request.
protected _delete ( string $endpoint, string[] $query, boolean $customPostfix = false, boolean $dwollaParse = true ) : string[]
$endpoint string API endpoint string
$query string[] Array of URLEncoded query items in key-value pairs.
$customPostfix boolean Use default REST postfix?
$dwollaParse boolean Parse out of message envelope?
Результат string[] Response body.

_error() защищенный Метод

Small error message wrapper for missing parameters, etc.
protected _error ( string $message ) : boolean
$message string Error message.
Результат boolean

_get() защищенный Метод

Wrapper around Guzzle GET request.
protected _get ( string $endpoint, string[] $query, boolean $customPostfix = false, boolean $dwollaParse = true ) : string[]
$endpoint string API endpoint string
$query string[] Array of URLEncoded query items in key-value pairs.
$customPostfix boolean Use default REST postfix?
$dwollaParse boolean Parse out of message envelope?
Результат string[] Response body.

_host() защищенный Метод

Returns default host URL dependent on sandbox flag.
protected _host ( ) : string
Результат string Host

_logtofile() защищенный Метод

(Thank you, @redzarf for your contribution)
protected _logtofile ( $data )
$data {???} Can be anything.

_post() защищенный Метод

Wrapper around Guzzle POST request.
protected _post ( string $endpoint, string $request, boolean $customPostfix = false, boolean $dwollaParse = true ) : String[]
$endpoint string API endpoint string
$request string Request body. JSON encoding is optional.
$customPostfix boolean Use default REST postfix?
$dwollaParse boolean Parse out of message envelope?
Результат String[] Response body.

_put() защищенный Метод

Wrapper around Guzzle PUT request.
protected _put ( string $endpoint, string $request, boolean $customPostfix = false, boolean $dwollaParse = true ) : String[]
$endpoint string API endpoint string
$request string Request body. JSON encoding is optional.
$customPostfix boolean Use default REST postfix?
$dwollaParse boolean Parse out of message envelope?
Результат String[] Response body.

Описание свойств

$client публичное статическое свойство

Placeholder for Guzzle REST client.
public static $client

$settings публичное статическое свойство

Settings object.
public static $settings