class Policy implements JsonSerializable

Policy class.

Constants

EFFECTS

ACTIONS

Methods

__construct(string $effect, string|array $actions = [], ConstraintInterface $constraint = null)

Policy constructor.

string
getEffect()

No description

setEffect(string $effect)

No description

string|string[]
getActions()

No description

setActions(string|string[] $actions)

No description

addAction(string $action)

No description

getConstraint()

No description

setConstraint(ConstraintInterface $constraint = null)

No description

array
jsonSerialize()

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

Details

at line 64
__construct(string $effect, string|array $actions = [], ConstraintInterface $constraint = null)

Policy constructor.

Parameters

string $effect Either "allow" or "deny"
string|array $actions Either "all" or an array
ConstraintInterface $constraint

at line 74
string getEffect()

Return Value

string Either "allow" or "deny"

at line 84
Policy setEffect(string $effect)

Parameters

string $effect Either "allow" or "deny"

Return Value

Policy

at line 101
string|string[] getActions()

Return Value

string|string[] Either the string "all", or an array with available actions

at line 111
Policy setActions(string|string[] $actions)

Parameters

string|string[] $actions Either the string "all", or an array with available actions

Return Value

Policy

at line 134
Policy addAction(string $action)

Parameters

string $action

Return Value

Policy

at line 158
ConstraintInterface|null getConstraint()

Return Value

ConstraintInterface|null

at line 168
Policy setConstraint(ConstraintInterface $constraint = null)

Parameters

ConstraintInterface $constraint

Return Value

Policy

at line 180
array jsonSerialize()

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

Return Value

array