public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /* @var RoleService $roleService */ $roleService = $container->get('ZfcRbac\\Service\\RoleService'); return new HasRole($roleService); }