public function Select::__clone

Implements the magic __clone function.

Overrides Query::__clone

File

drupal/core/lib/Drupal/Core/Database/Query/Select.php, line 776
Definition of Drupal\Core\Database\Query\Select

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

public function __clone() {

  // On cloning, also clone the dependent objects. However, we do not
  // want to clone the database connection object as that would duplicate the
  // connection itself.
  $this->where = clone $this->where;
  $this->having = clone $this->having;
  foreach ($this->union as $key => $aggregate) {
    $this->union[$key]['query'] = clone $aggregate['query'];
  }
}