/** * {@inheritdoc} */ public function begin() { $this->assertNotStarted(); $response = $this->session->begin(); $body = json_decode($response->getBody(), true); $parts = explode('/', $body['commit']); $this->transactionId = (int) $parts[count($parts) - 2]; $this->state = self::OPENED; $this->session->transaction = $this; }