/** * Pops the newest Filter from each of <tt>queries</tt>, * grouping each popped Filter into one new FilterGroup. * Adds that new FilterGroup as the newest Filter in this * Query. * <p> * The FilterGroup's logic will be determined by <tt>op</tt>. * @param string op operator name * @param array Array of Query filter criteria * @return obj queries Query object */ protected function popFilters($op, array $queries) { $group = new FilterGroup(); $group->op($op); foreach ($queries as $query) { if (!$query->rowFilters) { //check to ensure nly filters are combined throw new Exception("Operator " . $op . " can be used only to combine row filters"); return false; } else { $group->add(array_pop($query->rowFilters)); } } $this->add($group); return $this; }