Dependency injection zf2和x27;类型为“的实例化器无效”;空";至于;Zend\Db\Adapter\Profiler\ProfilerInterface“;
这是警告Dependency injection zf2和x27;类型为“的实例化器无效”;空";至于;Zend\Db\Adapter\Profiler\ProfilerInterface“;,dependency-injection,dependencies,zend-framework2,adapter,Dependency Injection,Dependencies,Zend Framework2,Adapter,这是警告 zf2 'Invalid instantiator of type "NULL" for "Zend\Db\Adapter\Profiler\ProfilerInterface" 这是我的local.config.php,适配器希望我使用函数setProfile设置一个概要文件。setProfile函数位于“Zend\Db\Adapter\Adapter”。我在编程方面是个十足的白痴,我不知道如何解决这个问题,我甚至不知道它期望的是什么参数而不是NULL,我甚至不想要一个分析器
zf2 'Invalid instantiator of type "NULL" for "Zend\Db\Adapter\Profiler\ProfilerInterface"
这是我的local.config.php,适配器希望我使用函数setProfile设置一个概要文件。setProfile函数位于“Zend\Db\Adapter\Adapter”。我在编程方面是个十足的白痴,我不知道如何解决这个问题,我甚至不知道它期望的是什么参数而不是NULL,我甚至不想要一个分析器
include (__DIR__ . '/../../vendor/Core/config/function.local.php');
$dbParams = $functionVars['dbParams'];
return array(
'di' => array(
'allowed_controllers' => array(
'Application\Controller\IndexController',
'Login\Controller\FormController',
'Login\Controller\RegisterController',
),
'instance' => array(
'Zend\Db\Adapter\Adapter' => array(
'parameters' => array(
'driver' => 'Zend\Db\Adapter\Driver\Pdo\Pdo',
),
),
'Zend\Db\Adapter\Driver\Pdo\Pdo' => array(
'parameters' => array(
'connection' => 'Zend\Db\Adapter\Driver\Pdo\Connection',
),
),
'Zend\Db\Adapter\Driver\Pdo\Connection' => array(
'parameters' => array(
'connectionParameters' => array(
'dsn' => "mysql:dbname=" . $dbParams['database'] . ";host=" . $dbParams['hostname'],
'username' => $dbParams['username'],
'password' => $dbParams['password'],
'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''),
),
),
),
),
),
);
你想要什么?你想做什么?没关系,我现在用服务经理。。。他厌倦了所有的麻烦