public function start() { if ($this->hasStarted()) { throw new \Exception('The unit of work has already been started.'); } $this->hasStarted = true; if ($this->isTransactional()) { $this->transactionManager->startTransaction(); } }
private function startTransaction() { if ($this->isTransactional()) { $this->transactionManager->startTransaction(); } }