class UserAgentGenerator

Methods

__construct(string $name, string $version)

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 40
__construct(string $name, string $version)

UserAgentGenerator constructor.

Parameters

string $name
string $version

at line 53
$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 71
$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 112
string getUserAgent()

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

Return Value

string