public function transaction() { if ($this->transaction instanceof Transaction) { throw new \RuntimeException('A transaction is already bound to this session'); } return new Transaction($this); }