How does Zend\Db in ZF2 control transactions?
问题 The ZF1 Zend_Db reference manual has an entire section on performing transactions. The ZF2 Zend\Db reference manual lacks any documentation on transactions. How do I perform transactions in ZF2? Example code would be helpful. 回答1: The missing documentation is curious. To find out what happened, I had to dive into the API docs for Zend\Db\Adapter. It looks like beginTransaction , rollback and commit are defined in Zend\Db\Adapter\Driver\ConnectionInterface. This means that they are methods