/**
  * Get constraint type handler for driver
  *
  * @param \DatabaseConnection $connection
  * @param string $type
  *
  * @return ConstraintInterface
  */
 public function get(\DatabaseConnection $connection, $type)
 {
     $driver = $connection->driver();
     if (isset($this->instances[$driver][$type])) {
         return $this->instances[$driver][$type];
     }
     return $this->instances[$driver][$type] = $this->createInstance($connection, $type);
 }
예제 #2
0
 public function driver()
 {
     return $this->connection->driver();
 }