class PreviewApiKey extends ApiKey

PreviewApiKey class.

This class represents a resource with type "PreviewApiKey" in Contentful.

Properties

protected SystemProperties $sys from BaseResource
protected BaseProxy $proxy from BaseResource
protected string $name from ApiKey
protected string|null $description from ApiKey
protected string|null $accessToken from ApiKey

Methods

__construct()

PreviewApiKey constructor.

getSystemProperties()

Returns the resource's system properties, defined in the object "sys" in Contentful's responses.

string|null
getId()

Shortcut for accessing the resource ID through its system properties.

Link
asLink()

Creates a Link representation of the current resource.

setProxy(BaseProxy $proxy)

Sets the current BaseProxy object instance.

asRequestBody()

{@inheritdoc}

__call(string $name, array $arguments)

Shortcut for forwarding methods to the current proxy, using the current object as argument.

string
getName()

No description

from ApiKey
setName(string $name)

No description

from ApiKey
string|null
getDescription()

No description

from ApiKey
setDescription(string $description)

No description

from ApiKey
string|null
getAccessToken()

No description

from ApiKey
array
jsonSerialize()

Returns an array to be used by "json_encode" to serialize objects of this class.

from ApiKey

Details

at line 24
final __construct()

PreviewApiKey constructor.

in BaseResource at line 47
SystemProperties getSystemProperties()

Returns the resource's system properties, defined in the object "sys" in Contentful's responses.

Return Value

SystemProperties

in BaseResource at line 57
string|null getId()

Shortcut for accessing the resource ID through its system properties.

Return Value

string|null

Creates a Link representation of the current resource.

Return Value

Link

in BaseResource at line 79
BaseResource setProxy(BaseProxy $proxy)

Sets the current BaseProxy object instance.

This is done automatically when performing API calls, so it shouldn't be used manually.

Parameters

BaseProxy $proxy

Return Value

BaseResource

at line 35
asRequestBody()

{@inheritdoc}

in BaseResource at line 111
__call(string $name, array $arguments)

Shortcut for forwarding methods to the current proxy, using the current object as argument.

// Instead of
$client->asset->publish($asset);
// You can use
$asset->publish();

Parameters

string $name
array $arguments

in ApiKey at line 35
string getName()

Return Value

string

in ApiKey at line 45
ApiKey setName(string $name)

Parameters

string $name

Return Value

ApiKey

in ApiKey at line 55
string|null getDescription()

Return Value

string|null

in ApiKey at line 65
ApiKey setDescription(string $description)

Parameters

string $description

Return Value

ApiKey

in ApiKey at line 75
string|null getAccessToken()

Return Value

string|null

in ApiKey at line 85
array jsonSerialize()

Returns an array to be used by "json_encode" to serialize objects of this class.

Return Value

array