首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >zfcuser、bjyauthorize和orm类的最新消息

zfcuser、bjyauthorize和orm类的最新消息
EN

Stack Overflow用户
提问于 2013-08-02 23:44:21
回答 1查看 565关注 0票数 0

我正在使用zfcuser、zfcuser- sure orm和bjyauthorize,但我不确定如何处理所有的配置。我已经设置好

代码语言:javascript
复制
return array(
    'bjyauthorize' => array(
        // default role for unauthenticated users
        'default_role' => 'guest',
        // default role for authenticated users (if using the
        // 'BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider' identity provider)
        'authenticated_role' => 'user',
        // identity provider service name
        'identity_provider' => 'BjyAuthorize\Provider\Identity\AuthenticationDoctrineEntity',
        // Role providers to be used to load all available roles into Zend\Permissions\Acl\Acl
        // Keys are the provider service names, values are the options to be passed to the provider
        'role_providers' => array(
            /* here, 'guest' and 'user are defined as top-level roles, with
             * 'admin' inheriting from user
             */
            'BjyAuthorize\Provider\Role\DoctrineEntity' => array(
                'role_entity_class' => 'Application\Entity\Role',
            ),

[...]

(我在Add BjyAuthorize Roles (using ZfcUser and Doctrine)上使用@ocramius建议的BjyAuthorize\Provider\Role\DoctrineEntity )

但是"BjyAuthorize\Provider\Role\DoctrineEntity“不存在于模块中,也不在工厂中。我试着使用:

代码语言:javascript
复制
'BjyAuthorize\Provider\Role\DoctrineEntity' => 'BjyAuthorize\Service\DoctrineEntityRoleProviderFactory',

但它不起作用:

代码语言:javascript
复制
Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotCreatedException' with message 'While attempting to create bjyauthorizeproviderroledoctrineentity(alias: BjyAuthorize\Provider\Role\DoctrineEntity) an invalid factory was registered for this instance type.' in D:\wamp\www\vidum\src\vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php on line 860

谁知道这个工厂的班级是哪一个?

EN

回答 1

Stack Overflow用户

发布于 2013-09-20 22:34:19

连接Doctrine角色提供程序的正确类是

BjyAuthorize\Provider\Role\ObjectRepositoryProvider

您可以看到一个示例设置in the docs

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18021083

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档