class Policy implements JsonSerializable

Policy class.

Constants

EFFECTS

ACTIONS

Methods

__construct(string $effect, $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

jsonSerialize()

{@inheritdoc}

Details

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

Policy constructor.

Parameters

string $effect
$actions
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 98
string|string[] getActions()

Return Value

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

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

Parameters

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

Return Value

Policy

at line 126
Policy addAction(string $action)

Parameters

string $action

Return Value

Policy

at line 145
ConstraintInterface|null getConstraint()

Return Value

ConstraintInterface|null

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

Parameters

ConstraintInterface $constraint

Return Value

Policy

at line 163
jsonSerialize()

{@inheritdoc}