/** * Returns the currently active transaction. * * @return Transaction the currently active transaction. Null if no active transaction. */ public function getCurrentTransaction() { if ($this->transaction !== null) { if ($this->transaction->getActive()) { return $this->transaction; } } return null; }