1) { $ret = array(); foreach($parts as $part) { $ret[] = $this->parse($part, $type); } $r = implode(" AND ",$ret); } else { $parts = Doctrine_Query::bracketExplode($str," || ","(",")"); if(count($parts) > 1) { $ret = array(); foreach($parts as $part) { $ret[] = $this->parse($part); } $r = implode(" OR ",$ret); } else { return $this->load($parts[0]); } } if($brackets) return "(".$r.")"; else return $r; } } ?>