PHP Class LeagueWrap\Client

Inheritance: implements leaguewrap\ClientInterface
Afficher le fichier Open project: paquettg/leaguewrap

Protected Properties

Свойство Type Description
$guzzle
$timeout

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
buildGuzzle ( $url, $handler = null )

Method Details

addMock() public méthode

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
Résultat void

baseUrl() public méthode

Sets the base url to be used for future requests.
public baseUrl ( string $url ) : void
$url string
Résultat void

request() public méthode

Attempts to do a request of the given path.
public request ( string $path, array $params = [] ) : Response
$path string
$params array
Résultat Response

setTimeout() public méthode

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
Résultat void

Property Details

$guzzle protected_oe property

protected $guzzle

$timeout protected_oe property

protected $timeout