protected function verifyRequiredFields(SelectQuery $query, array $requiredFields = null) {
        if ($requiredFields == null) {
            $requiredFields = $this->getRequiredFields();
        }
        if (!empty($requiredFields)) {
            foreach ($requiredFields as $requiredField) {
                if (empty($query->getWhereCondition($requiredField, null, false, true))) {
                    throw new RuntimeException("Condition required: $requiredField");
                }
            }
        }
    }
protected function verifyRequiredFields(SelectQuery $query, array $requiredFields = null) {
        if ($requiredFields == null) {
            $requiredFields = $this->getRequiredFields();
        }
        if (!empty($requiredFields)) {
            foreach ($requiredFields as $requiredField) {
                if (empty($query->getWhereCondition($requiredField, null, false, true))) {
                    throw new RuntimeException("Condition required: $requiredField");
                }
            }
        }
    }
protected function verifyRequiredFields ( SelectQuery $ query , array $ requiredFields = null ) { if ( $ requiredFields == null ) { $ requiredFields = $ this -> getRequiredFields ( ) ; } if ( ! empty ( $ requiredFields ) ) { foreach ( $ requiredFields as $ requiredField ) { if ( empty ( $ query -> getWhereCondition ( $ requiredField , null , false , true ) ) ) { throw new RuntimeException ( "Condition required: $requiredField" ) ; } } } }
Valida que el query contenga los campos requeridos
@param SelectQuery $query
@param array|null $requiredFields
Valida que el query contenga los campos requeridos