diff options
Diffstat (limited to 'Core/Role/RoleHierarchyInterface.php')
-rw-r--r-- | Core/Role/RoleHierarchyInterface.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Core/Role/RoleHierarchyInterface.php b/Core/Role/RoleHierarchyInterface.php new file mode 100644 index 0000000..9f5cd5d --- /dev/null +++ b/Core/Role/RoleHierarchyInterface.php @@ -0,0 +1,32 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien.potencier@symfony-project.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Role; + +/** + * RoleHierarchyInterface is the interface for a role hierarchy. + * + * @author Fabien Potencier <fabien.potencier@symfony-project.com> + */ +interface RoleHierarchyInterface +{ + /** + * Returns an array of all reachable roles. + * + * Reachable roles are the roles directly assigned but also all roles that + * are transitively reachable from them in the role hierarchy. + * + * @param array $roles An array of directly assigned roles + * + * @return array An array of all reachable roles + */ + function getReachableRoles(array $roles); +} |