class SpaceMembership extends BaseResource implements Creatable, Updatable, Deletable

SpaceMembership class.

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

Properties

protected SystemProperties $sys from BaseResource
protected BaseProxy $proxy from BaseResource
protected bool $admin
protected string|null $email
protected Link[] $roles
protected Link|null $user

Methods

__construct()

SpaceMembership 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.

array
jsonSerialize()

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

bool
isAdmin()

No description

setAdmin(bool $admin)

No description

string|null
getEmail()

No description

setEmail(string $email)

No description

Link[]
getRoles()

No description

addRole(Link $role)

No description

setRoles(array $roles = [])

No description

Link|null
getUser()

No description

Details

at line 49
__construct()

SpaceMembership 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

in BaseResource at line 89
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

at line 59
array jsonSerialize()

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

Return Value

array

at line 77
bool isAdmin()

Return Value

bool

at line 87
SpaceMembership setAdmin(bool $admin)

Parameters

bool $admin

Return Value

SpaceMembership

at line 97
string|null getEmail()

Return Value

string|null

at line 107
SpaceMembership setEmail(string $email)

Parameters

string $email

Return Value

SpaceMembership

at line 117
Link[] getRoles()

Return Value

Link[]

at line 127
SpaceMembership addRole(Link $role)

Parameters

Link $role

Return Value

SpaceMembership

at line 139
SpaceMembership setRoles(array $roles = [])

Parameters

array $roles

Return Value

SpaceMembership

at line 149
Link|null getUser()

Return Value

Link|null