0

zfcuser、zfcuser-doctrine-orm、および bjyauthorize を使用していますが、すべての構成を処理する方法がわかりません。設定しました

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',
            ),

[...]

( BjyAuthorize Roles の追加 (ZfcUser と Doctrine を使用) で @ocramiusが提案したように、BjyAuthorize\Provider\Role\DoctrineEntity を使用しています)

しかし、「BjyAuthorize\Provider\Role\DoctrineEntity」はモジュールには存在せず、ファクトリにもありません。私は使用しようとしました:

'BjyAuthorize\Provider\Role\DoctrineEntity' => 'BjyAuthorize\Service\DoctrineEntityRoleProviderFactory',

しかし、それは機能しません:

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

このファクトリのクラスを知っている人はいますか?

4

1 に答える 1

0

Doctrine ロール プロバイダを接続する正しいクラスは次のとおりです。

BjyAuthorize\Provider\Role\ObjectRepositoryProvider

docs でセットアップの例を見ることができます。

于 2013-09-20T14:34:19.227 に答える