gpt4 book ai didi

php - 配置中的 ZF2 Doctrine2 setFilterSchemaAssetsExpression 设置

转载 作者:搜寻专家 更新时间:2023-10-31 20:41:10 25 4
gpt4 key购买 nike

如何设置

$config->setFilterSchemaAssetsExpression($regexp); 在我的 ZF2 配置中?

我不想执行 --completekill 我在数据库中的其他表。

'doctrine' => array(
'configuration' => array(
'orm_default' => array(
'numeric_functions' => array(
'COS' => 'DoctrineExtensions\Query\Mysql\Cos',
),
'types' => array(
'Point' => 'CrEOF\Spatial\DBAL\Types\Geometry\PointType',
),
),
),
'eventmanager' => array(
'orm_default' => array(
'subscribers' => array(
'Gedmo\Timestampable\TimestampableListener',
),
),
),
),

最佳答案

在全局配置中重新定义ORM ConfigurationFactory。

use DoctrineORMModule\Service\ConfigurationFactory as DoctrineConfigurationFactory;
use Zend\ServiceManager\ServiceLocatorInterface;

return array(
'service_manager' => array(
'factories' => array(
'doctrine.configuration.orm_default' => function(ServiceLocatorInterface $serviceLocator) {
$factory = new DoctrineConfigurationFactory('orm_default');

/**
* @var Doctrine\DBAL\Configuration $config
*/
$config = $factory->createService($serviceLocator);
$config->setFilterSchemaAssetsExpression('');
return $config;
}
),
),
);

关于php - 配置中的 ZF2 Doctrine2 setFilterSchemaAssetsExpression 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21177917/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com