minor #9374 Change of scope (djoos)

This PR was submitted for the 2.3 branch but it was merged into the 2.5-dev branch instead (closes #9374).

Discussion
----------

Change of scope

Hi,

when overriding the Symfony RoleHierarchy it would be great to be able to get access to the buildRoleMap-method and map-variable for more advanced usage.

Don't hesitate to ask for further clarification if necessary - thanks in advance for merging the PR!

Kind regards,
David

Commits
-------

621aaf1 Change of scope
This commit is contained in:
Fabien Potencier 2013-12-30 07:38:35 +01:00
commit 96c44862c5

View File

@ -19,7 +19,7 @@ namespace Symfony\Component\Security\Core\Role;
class RoleHierarchy implements RoleHierarchyInterface
{
private $hierarchy;
private $map;
protected $map;
/**
* Constructor.
@ -56,7 +56,7 @@ class RoleHierarchy implements RoleHierarchyInterface
return $reachableRoles;
}
private function buildRoleMap()
protected function buildRoleMap()
{
$this->map = array();
foreach ($this->hierarchy as $main => $roles) {