protected function build($withParentheses)
    {
        $builtConditions = [];
        foreach ($this->conditions as $condition) {
            if ($condition instanceof \Parable\ORM\Query\ConditionSet) {
                $builtConditions[] = $condition->buildWithParentheses();
            } else {
                $builtConditions[] = $condition->build();
            }
        }

        $glue = ' ' . static::TYPE . ' ';

        $string = implode($glue, $builtConditions);
        if ($withParentheses) {
            $string = "({$string})";
        }

        return $string;
    }
protected function build($withParentheses)
    {
        $builtConditions = [];
        foreach ($this->conditions as $condition) {
            if ($condition instanceof \Parable\ORM\Query\ConditionSet) {
                $builtConditions[] = $condition->buildWithParentheses();
            } else {
                $builtConditions[] = $condition->build();
            }
        }

        $glue = ' ' . static::TYPE . ' ';

        $string = implode($glue, $builtConditions);
        if ($withParentheses) {
            $string = "({$string})";
        }

        return $string;
    }
protected function build ( $ withParentheses ) { $ builtConditions = [ ] ; foreach ( $ this -> conditions as $ condition ) { if ( $ condition instanceof \ Parable \ ORM \ Query \ ConditionSet ) { $ builtConditions [ ] = $ condition -> buildWithParentheses ( ) ; } else { $ builtConditions [ ] = $ condition -> build ( ) ; } } $ glue = ' ' . static :: TYPE . ' ' ; $ string = implode ( $ glue , $ builtConditions ) ; if ( $ withParentheses ) { $ string = "({$string})" ; } return $ string ; }
Build the conditions into a string. Can be done either with parentheses or without.

@param bool $withParentheses

@return string
Build the conditions into a string . Can be done either with parentheses or without .