2013-08-02 21 views
0

我正在使用zfcuser,zfcuser-doctrine-orm和bjyauthorize,但我不確定如何處理所有配置。我已經設置好的zfcuser,bjyauthorize和orm的最新消息

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 \供應商\角色\ DoctrineEntity通過@ocramius上Add BjyAuthorize Roles (using ZfcUser and Doctrine)的建議),但 「BjyAuthorize \供應商\角色\ 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 

有誰知道這是該工廠類?

+0

只是想知道這是否仍然是一個活生生的問題嗎? –

回答

0

正確的類掛鉤學說作用提供商

BjyAuthorize\Provider\Role\ObjectRepositoryProvider

你可以看到一個例子設置in the docs