我将如何在 Zend 框架 2 中实现主从连接

how i would achieve Master slave connection in Zend framework 2

实际上,我在 Zend Framework 2 上的项目中使用此 link configure multiple databases in zf2 实现了主从连接。但是该解决方案对我现有的项目进行了太多更改。所以,我想避免这种变化,并以最少的变化实现主从连接。 那么,如何才能实现呢?

Of You are Using tablegateway in zf2 您可以使用MasterSlave Feature。

http://framework.zend.com/manual/current/en/modules/zend.db.table-gateway.html#tablegateway-features