Jackalope\Transport\DoctrineDBAL\Client::beginTransaction PHP Method

beginTransaction() public method

{@inheritDoc}
public beginTransaction ( )
    public function beginTransaction()
    {
        if ($this->inTransaction) {
            throw new RepositoryException('Begin transaction failed: transaction already open');
        }
        $this->assertLoggedIn();
        try {
            $this->getConnection()->beginTransaction();
            $this->inTransaction = true;
        } catch (\Exception $e) {
            throw new RepositoryException('Begin transaction failed: ' . $e->getMessage());
        }
    }

Usage Example

Example #1
0
 /**
  * {@inheritDoc}
  */
 public function beginTransaction()
 {
     return $this->transport->beginTransaction();
 }