class Client

Abstract client for common code for the different clients.

Methods

__construct(string $token, string $baseUri, string $api, LoggerInterface $logger = null, ClientInterface $guzzle = null)

Client constructor.

$this
setApplication(string|null $name, string|null $version = null)

Set the application name and version. The values are used as part of the X-Contentful-User-Agent header.

$this
setIntegration(string|null $name, string|null $version = null)

Set the integration name and version. The values are used as part of the X-Contentful-User-Agent header.

array|null
request(string $method, string $path, array $options = [])

No description

string
getSdkName()

The name of the library to be used in the User-Agent header.

string
getSdkVersion()

The version of the library to be used in the User-Agent header.

Details

at line 61
__construct(string $token, string $baseUri, string $api, LoggerInterface $logger = null, ClientInterface $guzzle = null)

Client constructor.

Parameters

string $token
string $baseUri
string $api
LoggerInterface $logger
ClientInterface $guzzle

at line 80
$this setApplication(string|null $name, string|null $version = null)

Set the application name and version. The values are used as part of the X-Contentful-User-Agent header.

Parameters

string|null $name
string|null $version

Return Value

$this

at line 95
$this setIntegration(string|null $name, string|null $version = null)

Set the integration name and version. The values are used as part of the X-Contentful-User-Agent header.

Parameters

string|null $name
string|null $version

Return Value

$this

at line 109
protected array|null request(string $method, string $path, array $options = [])

Parameters

string $method
string $path
array $options

Return Value

array|null

at line 231
abstract protected string getSdkName()

The name of the library to be used in the User-Agent header.

Return Value

string

at line 238
abstract protected string getSdkVersion()

The version of the library to be used in the User-Agent header.

Return Value

string