Zend framework2 如何使ZfcUser使用抽象db_适配器
我正在使用Zend Framework 2,并且已经安装了ZfcUser模块 在我决定在我的Zend framework2 如何使ZfcUser使用抽象db_适配器,zend-framework2,zfcuser,Zend Framework2,Zfcuser,我正在使用Zend Framework 2,并且已经安装了ZfcUser模块 在我决定在我的config/autoload/global.php中添加第二个db适配器之前,一切都正常工作 <?php return array( 'db' => array( 'adapters' => array( 'cleardb' => array( 'driver' => 'Pdo', 'dsn'
config/autoload/global.php中添加第二个db适配器之前,一切都正常工作
<?php
return array(
'db' => array(
'adapters' => array(
'cleardb' => array(
'driver' => 'Pdo',
'dsn' => 'mysql:dbname=secret;host=secret.com',
'driver_options' => array(
...
),
),
'other' => array(...)
)
),
'service_manager' => array(
'abstract_factories' => array(
'Zend\Db\Adapter\AdapterAbstract'
=> 'Zend\Db\Adapter\AdapterAbstractServiceFactory',
),
),
);
这是我尝试登录时遇到的错误:
An alias "zfcuser_zend_db_adapter" was requested but no service could be found.
非常感谢您的帮助。也许您的zfcuser.global.php中应该是“zend\u db\u adapter”=>“zend\db\adapter\AdapterAbstract”?
An alias "zfcuser_zend_db_adapter" was requested but no service could be found.