Свойство | Тип | Описание | |
---|---|---|---|
$ruleClass | string | Class name used when rule created from string. | |
$rules | SimpleAcl\Rule[] | Contains registered rules. |
Метод | Описание | |
---|---|---|
addRule ( ) | Adds rule. | |
getRuleClass ( ) : string | Return rule class. | |
hasRule ( SimpleAcl\Rule | mixed $needRule ) : boolean | Return true if rule was already added. | |
isAllowed ( string | SimpleAcl\Role\RoleAggregateInterface $roleName, string | SimpleAcl\Resource\ResourceAggregateInterface $resourceName, string $ruleName ) : boolean | Checks is access allowed. | |
isAllowedReturnResult ( string | SimpleAcl\Role\RoleAggregateInterface $roleAggregate, string | SimpleAcl\Resource\ResourceAggregateInterface $resourceAggregate, string $ruleName ) : SimpleAcl\RuleResultCollection | Checks is access allowed. | |
removeAllRules ( ) | Remove all rules. | |
removeRule ( null | string $roleName = null, null | string $resourceName = null, null | string $ruleName = null, boolean $all = true ) | Remove rules by rule name and (or) role and resource. | |
removeRuleById ( mixed $ruleId ) | Removes rule by its id. | |
setRuleClass ( string $ruleClass ) | Set rule class. |
Метод | Описание | |
---|---|---|
getNames ( string | SimpleAcl\Role\RoleAggregateInterface | SimpleAcl\Resource\ResourceAggregateInterface $object ) : array | Get names. | |
isRuleAllow ( string $roleName, string $resourceName, $ruleName, SimpleAcl\RuleResultCollection $ruleResultCollection, string | SimpleAcl\Role\RoleAggregateInterface $roleAggregate, string | SimpleAcl\Resource\ResourceAggregateInterface $resourceAggregate ) | Check is access allowed by some rule. |
public addRule ( ) |
public isAllowed ( string | SimpleAcl\Role\RoleAggregateInterface $roleName, string | SimpleAcl\Resource\ResourceAggregateInterface $resourceName, string $ruleName ) : boolean | ||
$roleName | string | SimpleAcl\Role\RoleAggregateInterface | |
$resourceName | string | SimpleAcl\Resource\ResourceAggregateInterface | |
$ruleName | string | |
Результат | boolean |
public isAllowedReturnResult ( string | SimpleAcl\Role\RoleAggregateInterface $roleAggregate, string | SimpleAcl\Resource\ResourceAggregateInterface $resourceAggregate, string $ruleName ) : SimpleAcl\RuleResultCollection | ||
$roleAggregate | string | SimpleAcl\Role\RoleAggregateInterface | |
$resourceAggregate | string | SimpleAcl\Resource\ResourceAggregateInterface | |
$ruleName | string | |
Результат | SimpleAcl\RuleResultCollection |
protected isRuleAllow ( string $roleName, string $resourceName, $ruleName, SimpleAcl\RuleResultCollection $ruleResultCollection, string | SimpleAcl\Role\RoleAggregateInterface $roleAggregate, string | SimpleAcl\Resource\ResourceAggregateInterface $resourceAggregate ) | ||
$roleName | string | |
$resourceName | string | |
$ruleName | ||
$ruleResultCollection | SimpleAcl\RuleResultCollection | |
$roleAggregate | string | SimpleAcl\Role\RoleAggregateInterface | |
$resourceAggregate | string | SimpleAcl\Resource\ResourceAggregateInterface |
public removeRuleById ( mixed $ruleId ) | ||
$ruleId | mixed |
public setRuleClass ( string $ruleClass ) | ||
$ruleClass | string |
protected string $ruleClass | ||
Результат | string |