protected function compileOrWheres(array $orWheres, $query = '')
{
$ors = '';
foreach ($orWheres as $where) {
$ors .= $this->compileWhere($where);
}
// Make sure we wrap the query in an 'or' if using multiple
// orWheres. For example (|(QUERY)(ORWHEREQUERY)).
if ($query && count($orWheres) > 0 || count($orWheres) > 1) {
$query .= $this->compileOr($ors);
} else {
$query .= $ors;
}
return $query;
}