diff options
Diffstat (limited to 'Role/RoleHierarchyInterface.php')
-rw-r--r-- | Role/RoleHierarchyInterface.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Role/RoleHierarchyInterface.php b/Role/RoleHierarchyInterface.php new file mode 100644 index 0000000..b93a93c --- /dev/null +++ b/Role/RoleHierarchyInterface.php @@ -0,0 +1,33 @@ +<?php + +namespace Symfony\Component\Security\Role; + +/* + * 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. + */ + +/** + * 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 + */ + public function getReachableRoles(array $roles); +} |