Esempio n. 1
0
 private static function buildConnection($connection)
 {
     if ($connection instanceof \PDO) {
         $connection = new Connection($connection);
     } elseif (is_array($connection)) {
         $connection = Connection::make($connection);
     } elseif (!$connection instanceof Connection) {
         throw new \InvalidArgumentException("Argument must be an instance of PDO, DbSync\\Connection or a valid connection config array");
     }
     return $connection;
 }
Esempio n. 2
0
 public function setUp()
 {
     $this->utilityDb = \DbSync\Connection::make(include __DIR__ . '/config.php');
     $this->createTestDatabases();
 }
Esempio n. 3
0
 /**
  *
  */
 public function quote($value)
 {
     return $this->_connection->quote($value);
 }