/**
  * {@inheritdoc}
  */
 public function createStream(array $tables = array())
 {
     if (!$this->connection) {
         $this->createConnection();
     }
     $this->options->setTables($tables);
     $dumper = new MWP_IncrementalBackup_Database_StreamableQuerySequenceDump($this->connection, $this->options);
     return $dumper->createStream();
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function createStream(array $tables = array())
 {
     if ($this->environment->isPdoEnabled()) {
         $connection = new MWP_IncrementalBackup_Database_PdoConnection($this->configuration);
     } elseif ($this->environment->isMysqliEnabled()) {
         $connection = new MWP_IncrementalBackup_Database_MysqliConnection($this->configuration);
     } elseif ($this->environment->isMysqlEnabled()) {
         $connection = new MWP_IncrementalBackup_Database_MysqlConnection($this->configuration);
     } else {
         throw new MWP_IncrementalBackup_Database_Exception_ConnectionException("No mysql drivers available.");
     }
     $this->options->setTables($tables);
     $dumper = new MWP_IncrementalBackup_Database_StreamableQuerySequenceDump($connection, $this->options);
     return $dumper->createStream();
 }