Skip to content

Commit

Permalink
[373] Cannot get a name and parameters for RoleProviderPluginManager Z…
Browse files Browse the repository at this point in the history
  • Loading branch information
ashatrov committed May 4, 2017
1 parent 2ce24f1 commit 312c054
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ZfcRbac/Factory/RoleServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o

if (empty($roleProviderConfig)) {
throw new RuntimeException('No role provider has been set for ZfcRbac');
}
}

/* @var \ZfcRbac\Role\RoleProviderPluginManager $pluginManager */
$pluginManager = $container->get('ZfcRbac\Role\RoleProviderPluginManager');

/* @var \ZfcRbac\Role\RoleProviderInterface $roleProvider */
/* @var \ZfcRbac\Role\RoleProviderInterface $roleProvider */
reset($roleProviderConfig);
$roleProvider = $pluginManager->get(key($roleProviderConfig), current($roleProviderConfig));

/* @var \Rbac\Traversal\Strategy\TraversalStrategyInterface $traversalStrategy */
Expand Down

0 comments on commit 312c054

Please sign in to comment.