Method | Description | |
---|---|---|
__construct ( integer $roleId, string $name ) | Constructor | |
appendResource ( Scalr\Acl\Role\RoleResourceObject $resource ) : |
Appends access rule to resource | |
getIteratorResources ( ) : ArrayIterator | Gets iterator of all predefined resources with unique permissions | |
getName ( ) : string | Gets the name of the ACL role | |
getResource ( integer $resourceId ) : Scalr\Acl\Role\RoleResourceObject | Gets specified resource | |
getResources ( ) : ArrayObject | Gets the list of access rules to resources associated with the role. | |
getRoleId ( ) : integer | Gets the Id of the ACL role | |
isAllowed ( integer $resourceId, string $permissionId = null ) : boolean | null | Checks if specified resource is allowed | |
isOverridden ( integer $resourceId, string $permissionId = null ) : boolean | Checks if this resource has been overridden in this role | |
setName ( string $name ) : |
Sets the name of the role | |
setRoleId ( integer $roleId ) : |
Sets the ID of the Role |
public __construct ( integer $roleId, string $name ) | ||
$roleId | integer | The ID of the ACL role |
$name | string | The name of the ACL role |
public appendResource ( Scalr\Acl\Role\RoleResourceObject $resource ) : |
||
$resource | Scalr\Acl\Role\RoleResourceObject | The role resource object. |
return |
public getIteratorResources ( ) : ArrayIterator | ||
return | ArrayIterator |
public getResource ( integer $resourceId ) : Scalr\Acl\Role\RoleResourceObject | ||
$resourceId | integer | The ID of the ACL resource |
return | Scalr\Acl\Role\RoleResourceObject | Returns resource object if access has been set for it. |
public getResources ( ) : ArrayObject | ||
return | ArrayObject | Returns the list of the access rules. |
public isAllowed ( integer $resourceId, string $permissionId = null ) : boolean | null | ||
$resourceId | integer | The ID of the resource. |
$permissionId | string | optional The ID of the permission associated with resource. |
return | boolean | null | Returns true if access is allowed. If resource or permission isn't overridden it returns null. |