PHP Класс LeagueWrap\Client

Наследование: implements leaguewrap\ClientInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$guzzle
$timeout

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

Метод Описание
addMock ( GuzzleHttp\HandlerStack $mock ) : void Attempt to add a mocked handler stack to guzzle, primary usage is to be able to test this code.
baseUrl ( string $url ) : void Sets the base url to be used for future requests.
request ( string $path, array $params = [] ) : Response Attempts to do a request of the given path.
setTimeout ( integer $seconds ) : void Set a timeout in seconds for how long we will wait for the server to respond. If the server does not respond within the set number of seconds we throw an exception.

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

Метод Описание
buildGuzzle ( $url, $handler = null )

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

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

Attempt to add a mocked handler stack to guzzle, primary usage is to be able to test this code.
public addMock ( GuzzleHttp\HandlerStack $mock ) : void
$mock GuzzleHttp\HandlerStack
Результат void

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

Sets the base url to be used for future requests.
public baseUrl ( string $url ) : void
$url string
Результат void

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

Attempts to do a request of the given path.
public request ( string $path, array $params = [] ) : Response
$path string
$params array
Результат Response

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

Set a timeout in seconds for how long we will wait for the server to respond. If the server does not respond within the set number of seconds we throw an exception.
public setTimeout ( integer $seconds ) : void
$seconds integer
Результат void

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

$guzzle защищенное свойство

protected $guzzle

$timeout защищенное свойство

protected $timeout