Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Zend Framework 2条令2 BJ Younglbood Profiler报告未定义的索引数据库_Php_Mysql_Doctrine Orm_Zend Framework2 - Fatal编程技术网

Php Zend Framework 2条令2 BJ Younglbood Profiler报告未定义的索引数据库

Php Zend Framework 2条令2 BJ Younglbood Profiler报告未定义的索引数据库,php,mysql,doctrine-orm,zend-framework2,Php,Mysql,Doctrine Orm,Zend Framework2,我正在建立一个新的Zend Framework 2 Doctrine 2应用程序,其中包括BJ Youngblood的profiler。但是,在包含它之后,我现在在ProfilingAdapterFactory.php中收到错误未定义索引:db。/config/autoload中的My doctor.local.php包含我的所有数据库参数。ProfilingAdapterFactory尚未编辑的内容如下: public function createService(ServiceLocator

我正在建立一个新的Zend Framework 2 Doctrine 2应用程序,其中包括BJ Youngblood的profiler。但是,在包含它之后,我现在在
ProfilingAdapterFactory.php
中收到错误
未定义索引:db
。/config/autoload中的My doctor.local.php包含我的所有数据库参数。ProfilingAdapterFactory尚未编辑的内容如下:

public function createService(ServiceLocatorInterface $serviceLocator)
{
    $config = $serviceLocator->get('Configuration');
    $dbParams = $config['db'];
    $adapter = new ProfilingAdapter($dbParams);

    $adapter->setProfiler(new Profiler);
    if (isset($dbParams['options']) && is_array($dbParams['options'])) {
        $options = $dbParams['options'];
    } else {
        $options = array();
    }
    $adapter->injectProfilingStatementPrototype($options);
    return $adapter;
}

如何调整ProfiliingAdapterFactory.php以查看条令数据库参数?

Youngblood的profiler用于Zend\Db评测。 如果您需要一个用于Doctrine ORM的分析器,它已经包含在用于ZF2的Doctrine ORM模块中,所以您所需要做的就是通过composer以及zend developer工具安装此模块

"doctrine/doctrine-orm-module" : "0.*",
"zendframework/zend-developer-tools" : "dev-master",

你能展示一下你的配置文件吗。。。