RoleSecurityIdentity

class RoleSecurityIdentity implements SecurityIdentityInterface

A SecurityIdentity implementation for roles

Methods

__construct(mixed $role)

Constructor

string getRole()

Returns the role name

equals(SecurityIdentityInterface $sid)

This method is used to compare two security identities in order to not rely on referential equality.

string __toString()

Returns a textual representation of this security identity.

Details

__construct(mixed $role)

Constructor

Parameters

mixed $role a Role instance, or its string representation

string getRole()

Returns the role name

Return Value

string

equals(SecurityIdentityInterface $sid)

This method is used to compare two security identities in order to not rely on referential equality.

Parameters

SecurityIdentityInterface $sid

string __toString()

Returns a textual representation of this security identity.

This is solely used for debugging purposes, not to make an equality decision.

Return Value

string

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Security/Acl/Domain/RoleSecurityIdentity.html