conjunction = $conjunction; $this->query = $query; $this->namespaces = $namespaces; } /** * {@inheritdoc} */ public function getConjunction() { return $this->conjunction; } /** * {@inheritdoc} */ public function count() { return count($this->conditions); } /** * {@inheritdoc} */ public function &conditions() { return $this->conditions; } /** * Implements the magic __clone function. * * Makes sure condition groups are cloned as well. */ public function __clone() { foreach ($this->conditions as $key => $condition) { if ($condition['field'] instanceof ConditionInterface) { $this->conditions[$key]['field'] = clone($condition['field']); } } } }