private function hasOtherConditionField(ConditionGroup $conditionGroup, string $source, array $fieldNames, &$foundField = null) : bool {
        $result = false;
        $conditions = &$conditionGroup->getConditions();
        foreach ($conditions as $key=>&$condition) {
            if ($condition->type == ConditionType::GROUP) {
                $result = $this->hasOtherConditionField($condition->group, $source, $fieldNames, $foundField);
                if ($result) {
                    break;
                }
            } else if ($condition->type == ConditionType::RAW) {
                $result = true;
                $foundField = 'RAW';
                break;
            } else {
                $field = $condition->field;
                $tablePos = stripos($field, "$source.");
                if($tablePos === 0) {
                    $field = substr($field, strlen($source)+1);
                }
                if (!$this->fieldInList($field, $fieldNames)) {
                    $result = true;
                    $foundField = $field;
                    break;
                }

                if ($condition->operator == ConditionOperator::EQUALS_FIELD) {
                    $field = $condition->value;
                    $tablePos = stripos($field, "$source.");
                    if($tablePos === 0) {
                        $field = substr($field, strlen($source)+1);
                    }
                    if (!$this->fieldInList($field, $fieldNames)) {
                        $result = true;
                        $foundField = $field;
                        break;
                    }
                }
            }
        }
        return $result;
    }
private function hasOtherConditionField(ConditionGroup $conditionGroup, string $source, array $fieldNames, &$foundField = null) : bool {
        $result = false;
        $conditions = &$conditionGroup->getConditions();
        foreach ($conditions as $key=>&$condition) {
            if ($condition->type == ConditionType::GROUP) {
                $result = $this->hasOtherConditionField($condition->group, $source, $fieldNames, $foundField);
                if ($result) {
                    break;
                }
            } else if ($condition->type == ConditionType::RAW) {
                $result = true;
                $foundField = 'RAW';
                break;
            } else {
                $field = $condition->field;
                $tablePos = stripos($field, "$source.");
                if($tablePos === 0) {
                    $field = substr($field, strlen($source)+1);
                }
                if (!$this->fieldInList($field, $fieldNames)) {
                    $result = true;
                    $foundField = $field;
                    break;
                }

                if ($condition->operator == ConditionOperator::EQUALS_FIELD) {
                    $field = $condition->value;
                    $tablePos = stripos($field, "$source.");
                    if($tablePos === 0) {
                        $field = substr($field, strlen($source)+1);
                    }
                    if (!$this->fieldInList($field, $fieldNames)) {
                        $result = true;
                        $foundField = $field;
                        break;
                    }
                }
            }
        }
        return $result;
    }
private function hasOtherConditionField ( ConditionGroup $ conditionGroup , string $ source , array $ fieldNames , & $ foundField = null ) : bool { $ result = false ; $ conditions = & $ conditionGroup -> getConditions ( ) ; foreach ( $ conditions as $ key => & $ condition ) { if ( $ condition -> type == ConditionType :: GROUP ) { $ result = $ this -> hasOtherConditionField ( $ condition -> group , $ source , $ fieldNames , $ foundField ) ; if ( $ result ) { break ; } } else if ( $ condition -> type == ConditionType :: RAW ) { $ result = true ; $ foundField = 'RAW' ; break ; } else { $ field = $ condition -> field ; $ tablePos = stripos ( $ field , "$source." ) ; if ( $ tablePos === 0 ) { $ field = substr ( $ field , strlen ( $ source ) + 1 ) ; } if ( ! $ this -> fieldInList ( $ field , $ fieldNames ) ) { $ result = true ; $ foundField = $ field ; break ; } if ( $ condition -> operator == ConditionOperator :: EQUALS_FIELD ) { $ field = $ condition -> value ; $ tablePos = stripos ( $ field , "$source." ) ; if ( $ tablePos === 0 ) { $ field = substr ( $ field , strlen ( $ source ) + 1 ) ; } if ( ! $ this -> fieldInList ( $ field , $ fieldNames ) ) { $ result = true ; $ foundField = $ field ; break ; } } } } return $ result ; }
Retorna verdadero si en entre las codiciones encuentra otro field distinto a los indicados
@param ConditionGroup $conditionGroup
@param $source
@param array $fieldNames
@param null $foundField : referencia donde se coloca el nombre del primer field encontrado distinto de los indicados
@return bool
Retorna verdadero si en entre las codiciones encuentra otro field distinto a los indicados