Phraseanet PHP SDK API
Class

PhraseanetSDK\Http\GuzzleAdapter

class GuzzleAdapter implements GuzzleAdapterInterface

Methods

__construct(ClientInterface $guzzle)

ClientInterface getGuzzle()

string getBaseUrl()

Returns the client base URL

setUserAgent(string $userAgent)

Sets the user agent

string call(string $method, string $path, array $query = array(), array $postFields = array())

Performs an HTTP request, returns the body response

static  create(array $config, array $cache = array(), array $plugins = array())

Details

at line 38
public __construct(ClientInterface $guzzle)

Parameters

ClientInterface $guzzle

at line 48
public ClientInterface getGuzzle()

Return Value

ClientInterface

at line 58
public string getBaseUrl()

Returns the client base URL

Return Value

string

at line 68
public setUserAgent(string $userAgent)

Sets the user agent

Parameters

string $userAgent

at line 86
public string call(string $method, string $path, array $query = array(), array $postFields = array())

Performs an HTTP request, returns the body response

Parameters

string $method The method
string $path The path to query
array $query An array of query parameters
array $postFields An array of post fields

Return Value

string The response body

Exceptions

BadResponseException
RuntimeException

at line 103
static public create(array $config, array $cache = array(), array $plugins = array())

Parameters

array $config
array $cache
array $plugins