RoleHierarchy

RoleHierarchy

class RoleHierarchy implements RoleHierarchyInterface

RoleHierarchy defines a role hierarchy.

Methods

__construct(array $hierarchy)

Constructor.

RoleInterface[] getReachableRoles(array $roles)

Returns an array of all reachable roles by the given ones.

Details

__construct(array $hierarchy)

Constructor.

Parameters

array $hierarchy An array defining the hierarchy

RoleInterface[] getReachableRoles(array $roles)

Returns an array of all reachable roles by the given ones.

Reachable roles are the roles directly assigned but also all roles that are transitively reachable from them in the role hierarchy.

Parameters

array $roles An array of directly assigned roles

Return Value

RoleInterface[] An array of all reachable roles

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Security/Core/Role/RoleHierarchy.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部