BaseClient
class BaseClient
Abstract client for common code for the different clients.
Methods
Client constructor.
Set the application name and version. The values are used as part of the X-Contentful-User-Agent header.
Set the integration name and version. The values are used as part of the X-Contentful-User-Agent header.
No description
Override this method for registering a custom namespace where the Client will look for an exception. If no exception is found in the custom namespace, the default namespace will be used.
No description
No description
No description
Returns a string representation of the API currently in use.
The name of the library to be used in the User-Agent header.
The version of the library to be used in the User-Agent header.
Returns the Content-Type (MIME-Type) to be used when communication with the API.
Details
at line 62
__construct(string $accessToken, string $host, LoggerInterface $logger = \null, Client $httpClient = \null)
Client constructor.
at line 92
$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.
at line 107
$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.
at line 127
protected array|null
request(string $method, string $path, array $options = [])
at line 248
protected string|null
getExceptionNamespace()
Override this method for registering a custom namespace where the Client will look for an exception. If no exception is found in the custom namespace, the default namespace will be used.
at line 256
LoggerInterface
getLogger()
at line 264
Message[]
getMessages()
at line 272
string
getHost()
at line 282
abstract string
getApi()
Returns a string representation of the API currently in use.
at line 289
abstract protected string
getSdkName()
The name of the library to be used in the User-Agent header.
at line 296
abstract protected string
getSdkVersion()
The version of the library to be used in the User-Agent header.
at line 303
abstract protected string
getApiContentType()
Returns the Content-Type (MIME-Type) to be used when communication with the API.