Zend 2:如何覆盖模块的配置文件?



如何覆盖在./vendor/.../module_name/config/module.config.php下找到的配置文件?

不,这个链接对我不起作用。我不知道为什么。

尝试将配置文件命名为 filename.global.php 或 filename.local.php。

在 application.config 中.php它有这样一行:

config/autoload/{,*.}{global,local}.php

关于ZfcUser模块和更改主要路线。

zfcuser.global.php修改文件底部的以下内容:

return array(
    'zfcuser' => $settings,
    'service_manager' => array(
        'aliases' => array(
            'zfcuser_zend_db_adapter' => (isset($settings['zend_db_adapter'])) ? $settings['zend_db_adapter']: 'ZendDbAdapterAdapter',
        ),
    ),
    'router' => array(
        'routes' => array(
            'zfcuser' => array(
                'options' => array(
                    'route' => '/member',
                    'defaults' => array(
                        'controller' => 'zfcuser',
                        'action' => 'index',
                    ),
                ),
            )
        )
    )
);

最新更新