/**
  * {@inheritDoc}
  */
 public function __construct(array $configuration)
 {
     if (!isset($configuration['connection'])) {
         throw AdapterException::configurationException('Adapter connection configuration is missing');
     }
     if (isset($options['serializer'])) {
         $this->serializer = $options['serializer'];
     }
     if (isset($options['source_table_map'])) {
         $this->sourceTypeTableMap = $options['source_table_map'];
     }
     if (isset($options['snapshot_table'])) {
         $this->snapshotTable = $options['snapshot_table'];
     }
     $this->dbAdatper = new ZendDbAdapter($configuration['connection']);
 }
 /**
  * {@inheritDoc}
  */
 public function __construct(array $options)
 {
     if (!isset($options['connection'])) {
         throw AdapterException::configurationException('Missing connection configuration');
     }
     if (isset($options['serializer'])) {
         $this->serializer = $options['serializer'];
     }
     if (isset($options['source_table_map'])) {
         $this->sourceTypeTableMap = $options['source_table_map'];
     }
     if (isset($options['snapshot_table'])) {
         $this->snapshotTable = $options['snapshot_table'];
     }
     $this->conn = DriverManager::getConnection($options['connection']);
 }
Esempio n. 3
0
 /**
  * Rollback transaction
  * 
  * @throws AdapterException If adapter does not support transactions
  */
 public function rollback()
 {
     if (!$this->adapter instanceof TransactionFeatureInterface) {
         throw AdapterException::unsupportedFeatureException('TransactionFeature');
     }
     $this->adapter->rollback();
     $this->inTransaction = false;
     $this->pendingEvents = array();
 }