protected function __op($operator, $crits) { $ret = $this; $crits_count = count($this->component_crits); if ($crits_count == 0) { $this->component_crits[] = $crits; } elseif ($crits_count == 1) { $this->join_operator = $operator; $this->component_crits[] = $crits; } else { if ($this->join_operator == $operator) { $this->component_crits[] = $crits; } else { $new = new self($this); $new->__op($operator, $crits); $ret = $new; } } return $ret; }