PHP Class Larabros\Elogram\Http\Clients\AbstractAdapter

Inheritance: implements Larabros\Elogram\Http\Clients\AdapterInterface
Show file Open project: larabros/elogram

Public Methods

Method Description
paginate ( Response $response, $limit = null ) {@inheritDoc}
request ( $method, $uri, array $parameters = [] ) {@inheritDoc}

Protected Methods

Method Description
resolveExceptionClass ( GuzzleHttp\Exception\ClientException $exception ) : Larabros\Elogram\Exceptions\Exception Parses a ClientException for any specific exceptions thrown by the API in the response body. If the response body is not in JSON format, an Exception is returned.

Method Details

paginate() public method

{@inheritDoc}
public paginate ( Response $response, $limit = null )
$response Larabros\Elogram\Http\Response

request() abstract public method

{@inheritDoc}
abstract public request ( $method, $uri, array $parameters = [] )
$parameters array

resolveExceptionClass() protected method

Check a ClientException to see if it has an associated ResponseInterface object.
protected resolveExceptionClass ( GuzzleHttp\Exception\ClientException $exception ) : Larabros\Elogram\Exceptions\Exception
$exception GuzzleHttp\Exception\ClientException
return Larabros\Elogram\Exceptions\Exception