diff options
Diffstat (limited to 'Core/Role/RoleInterface.php')
-rw-r--r-- | Core/Role/RoleInterface.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Core/Role/RoleInterface.php b/Core/Role/RoleInterface.php new file mode 100644 index 0000000..923a933 --- /dev/null +++ b/Core/Role/RoleInterface.php @@ -0,0 +1,35 @@ +<?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; + +/** + * RoleInterface represents a role granted to a user. + * + * A role must either have a string representation or it needs to be explicitly + * supported by an at least one AccessDecisionManager. + * + * @author Fabien Potencier <fabien.potencier@symfony-project.com> + */ +interface RoleInterface +{ + /** + * Returns the role. + * + * This method returns a string representation whenever possible. + * + * When the role cannot be represented with sufficient precision by a + * string, it should return null. + * + * @return string|null A string representation of the role, or null + */ + function getRole(); +} |