class Membership (View source)

Represents the relation of a user to an organization.

Constants

ROLE_ADMIN

ROLE_WRITE

ROLE_READ

ROLE_UPLOAD

Properties

string $userId

UUID v4 of user.

string $organizationId

UUID v4 of organization.

array $roles Roles.
bool $active Active.
DateTime|null $lastAccess

Last acess of this user to this organization.

Methods

__construct(string $userId, string $organizationId, array $roles, bool $active, DateTime|null $lastAccess = null)

Constructor.

createFromJsonResponse(string $jsonString)

Create a user from the JSON data returned by the rokka.io API.

Details

__construct(string $userId, string $organizationId, array $roles, bool $active, DateTime|null $lastAccess = null)

Constructor.

Parameters

string $userId

User id

string $organizationId

Organization id

array $roles Roles
bool $active

If it is active

DateTime|null $lastAccess

Last access of the user to the organization

static Membership|Membership[] createFromJsonResponse(string $jsonString)

Create a user from the JSON data returned by the rokka.io API.

Parameters

string $jsonString

JSON as a string

Return Value

Membership|Membership[]