public function __invoke(ContainerInterface $container, $name, callable $callback, array $options = null)
{
$instanceToDecorate = call_user_func($callback);
if (!$instanceToDecorate instanceof AuthorizationServiceAwareInterface) {
throw new RuntimeException("The service {$name} must implement AuthorizationServiceAwareInterface.");
}
if ($container instanceof AbstractPluginManager) {
$container = $container->getServiceLocator();
}
$authorizationService = $container->get('ZfcRbac\\Service\\AuthorizationService');
$instanceToDecorate->setAuthorizationService($authorizationService);
return $instanceToDecorate;
}