public function setFieldNames(array $fieldNames)
    {
        $this->field_names = $fieldNames;
        $this->src = [];
        foreach ($this->field_names as $name) {
            $this->src[$name] = 0;
        }
        return $this;
    }
public function setFieldNames(array $fieldNames)
    {
        $this->field_names = $fieldNames;
        $this->src = [];
        foreach ($this->field_names as $name) {
            $this->src[$name] = 0;
        }
        return $this;
    }
public function setFieldNames ( array $ fieldNames ) { $ this -> field_names = $ fieldNames ; $ this -> src = [ ] ; foreach ( $ this -> field_names as $ name ) { $ this -> src [ $ name ] = 0 ; } return $ this ; }
Allows to specify list of fields
which will be used for totals calculation.

@param array|string[] $fieldNames
@return $this
Allows to specify list of fields which will be used for totals calculation .