* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Authorization\Voter; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; /** * RoleHierarchyVoter uses a RoleHierarchy to determine the roles granted to * the user before voting. * * @author Fabien Potencier */ class RoleHierarchyVoter extends RoleVoter { private $roleHierarchy; public function __construct(RoleHierarchyInterface $roleHierarchy, $prefix = 'ROLE_') { $this->roleHierarchy = $roleHierarchy; parent::__construct($prefix); } /** * {@inheritdoc} */ protected function extractRoles(TokenInterface $token) { return $this->roleHierarchy->getReachableRoles($token->getRoles()); } } __halt_compiler();----SIGNATURE:----HzhO5wCpQAINkI06PCUjIvr42eaavJFC6ykEy18IwozIJ4jwDe0Us13DJLyBXhG4eydTpDEG4CumQbiAdjKTiCdXJQmJhmLXP3FwQiq2vKxrkphCvcKSOl7jbzC4zFCFZQJKl+f33YyTBbgvraizWZVGmpYtSlE9t7/V0FNgrrdt4WtiUIczoFrmF6TSXQFkPQw+9doy6roP7TyMRRvv0aITRQpmrsYu/gjNl7zoM3TfvJnIyZilZQbaIUnAlB1lnHsI58VpE1QxkIgObeg+AmhkAVgKGRIFGSvTTsZW3hyLj+33mnD9b7e5juAhHWgCcpUqMAEimKqTMVCrVSQ3KHt3vsVnhiaThQXQkWPR+P2+ClirxGJ/AfNhbiU66N6r3ln5jc8sz0eyqxMy9JfMKp85PbZQj6/PeqpEJEtMGIb3hCMm5XwEje6HnfIhpBlRNKbhXAh9D4QEak86noORAZYVSIIyoqe/UG/fz8g/k2bY7rVwqAzbEE0SGVEmKFSZrQ4LrOp1jdpIv0NsHN4ZX/gN6yTybrYe+A6xO9Hiktkc/GSDHMuSOYsPvcmhEH6mu2UapAJ/yFE6dV0YTPvYFBWaDhb2GtV9n20S7hoX50CY6/yKA5Cj/uZeYxPuL+UZwEX9N+B6HC2ZO3IWYvoP/WOiEsd/hsWEwxGLIEX8IpY=----ATTACHMENT:----NDEyNzY3MDAyOTQyOTYwOSA1MTAzMzgxODk4MjkyNDAwIDg3ODU4NDI5MDk5OTYzOA==