class UserAgentGenerator

Methods

__construct(string $sdkName, string $sdkVersion)

UserAgentGenerator 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 application name and version. The values are used as part of the X-Contentful-User-Agent header.

string
getUserAgent()

Returns the value of the User-Agent header for any requests made to Contentful

Details

at line 52
__construct(string $sdkName, string $sdkVersion)

UserAgentGenerator constructor.

Parameters

string $sdkName
string $sdkVersion

at line 66
$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 85
$this setIntegration(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 141
string getUserAgent()

Returns the value of the User-Agent header for any requests made to Contentful

Return Value

string