Copied!

RoleCreateStruct

RoleCreateStruct.php : 16
Extends ValueObject

This class is used to create a new role.

Properties

public $identifier

RoleCreateStruct.php : 23

Readable string identifier of a role.

public string $identifier

Methods

public__construct()

ValueObject.php : 30

Construct object optionally with a set of properties.

public __construct([array<string|int, mixed> $properties = [] ])

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$properties array<string|int, mixed> [] -

publicaddPolicy()

RoleCreateStruct.php : 37

Adds a policy to this role.

public abstract addPolicy(PolicyCreateStruct $policyCreateStruct) : void

Parameters

Name Type Default value Description
$policyCreateStruct PolicyCreateStruct - -

publicgetPolicies()

RoleCreateStruct.php : 30

Returns policies associated with the role.

public abstract getPolicies() : array<string|int, PolicyCreateStruct>

Return values

array<string|int, PolicyCreateStruct>

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>