SwitchUserRole

class SwitchUserRole extends Role

SwitchUserRole is used when the current user temporarily impersonates another one.

Methods

__construct(string $role, TokenInterface $source)
string getRole()

Returns a string representation of the role.

from Role
TokenInterface getSource()

Returns the original Token.

Details

__construct(string $role, TokenInterface $source)

Parameters

string $role
TokenInterface $source The original token

string getRole()

Returns a string representation of the role.

Return Value

string

TokenInterface getSource()

Returns the original Token.

Return Value

TokenInterface The original TokenInterface instance

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Security/Core/Role/SwitchUserRole.html