Copied!

Policy

Policy.php : 11
Extends ValueObject

Base SPI Value object.

All properties of SPI\ValueObject must be serializable for cache & NoSQL use.

Properties

public $function

Policy.php : 54

Name of the module function Or all functions with '*'.

public string $function

Eg: read

public $id

Policy.php : 18

ID of the policy.

public mixed $id

public $limitations

Policy.php : 77

Array of policy limitations, which is just a random hash map.

public array<string|int, mixed>|string $limitations

The limitation array may look like: array( 'Subtree' => array( '/1/2/', '/1/4/', ), 'Foo' => array( 'Bar' ), … )

Where the keys are the limitation identifiers, and the respective values are an array of limitation values

If string, then only the value '' is allowed, meaning all limitations. Can not be a empty array as '' should be used in this case.

public $module

Policy.php : 45

Name of module, associated with the Policy.

public string $module

Eg: content

public $originalId

Policy.php : 36

Only used when the role's status, current policy belongs to, is Role::STATUS_DRAFT.

public int|null $originalId

Original policy ID the draft was created from. In other cases, will be null.

public $roleId

Policy.php : 25

Foreign ID of the role.

public mixed $roleId

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> [] -

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>