zfcuser、bjyauthorize和orm类的最新消息



我正在使用zfcuser、zfcuser条令orm和bjyauthorize,但我不确定如何处理所有配置。我设置了

return array(
    'bjyauthorize' => array(
        // default role for unauthenticated users
        'default_role' => 'guest',
        // default role for authenticated users (if using the
        // 'BjyAuthorizeProviderIdentityAuthenticationIdentityProvider' identity provider)
        'authenticated_role' => 'user',
        // identity provider service name
        'identity_provider' => 'BjyAuthorizeProviderIdentityAuthenticationDoctrineEntity',
        // Role providers to be used to load all available roles into ZendPermissionsAclAcl
        // 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
             */
            'BjyAuthorizeProviderRoleDoctrineEntity' => array(
                'role_entity_class' => 'ApplicationEntityRole',
            ),
[...]

(我正在使用BjyAuthorize\Provider\Role\DoctrineEntity,正如@ocramius在添加BjyAAuthorize角色时建议的那样(使用ZfcUser和Doctrine))

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

'BjyAuthorizeProviderRoleDoctrineEntity' => 'BjyAuthorizeServiceDoctrineEntityRoleProviderFactory',

但它不起作用:

Fatal error: Uncaught exception 'ZendServiceManagerExceptionServiceNotCreatedException' with message 'While attempting to create bjyauthorizeproviderroledoctrineentity(alias: BjyAuthorizeProviderRoleDoctrineEntity) an invalid factory was registered for this instance type.' in D:wampwwwvidumsrcvendorzendframeworkzendframeworklibraryZendServiceManagerServiceManager.php on line 860

有人知道这家工厂的哪个班吗?

连接条令角色提供者的正确类是

BjyAuthorizeProviderRoleObjectRepositoryProvider

您可以在文档中看到一个设置示例。

相关内容

  • 没有找到相关文章

最新更新