public final function setAugmentationData($data)
    {
        foreach($data as $id => $rowData){
            if (!isset($this->augmentationData[$id])){
                $this->augmentationData[$id] = $rowData;
            } else {
                $this->augmentationData[$id] = array_merge($this->augmentationData[$id], $rowData);
            }

            // If a previous intersection has duplicated any rows we need to find those and make sure those
            // duplicates also get this augmentation set.
            if (($key = (array_search($id, $this->duplicatedRows))) !== false){

                if (!isset($this->augmentationData[$key])) {
                    $this->augmentationData[$key] = $rowData;
                } else {
                    $this->augmentationData[$key] = array_merge($this->augmentationData[$key], $rowData);
                }
            }
        }
    }
public final function setAugmentationData($data)
    {
        foreach($data as $id => $rowData){
            if (!isset($this->augmentationData[$id])){
                $this->augmentationData[$id] = $rowData;
            } else {
                $this->augmentationData[$id] = array_merge($this->augmentationData[$id], $rowData);
            }

            // If a previous intersection has duplicated any rows we need to find those and make sure those
            // duplicates also get this augmentation set.
            if (($key = (array_search($id, $this->duplicatedRows))) !== false){

                if (!isset($this->augmentationData[$key])) {
                    $this->augmentationData[$key] = $rowData;
                } else {
                    $this->augmentationData[$key] = array_merge($this->augmentationData[$key], $rowData);
                }
            }
        }
    }
public final function setAugmentationData ( $ data ) { foreach ( $ data as $ id => $ rowData ) { if ( ! isset ( $ this -> augmentationData [ $ id ] ) ) { $ this -> augmentationData [ $ id ] = $ rowData ; } else { $ this -> augmentationData [ $ id ] = array_merge ( $ this -> augmentationData [ $ id ] , $ rowData ) ; } // If a previous intersection has duplicated any rows we need to find those and make sure those // duplicates also get this augmentation set. if ( ( $ key = ( array_search ( $ id , $ this -> duplicatedRows ) ) ) !== false ) { if ( ! isset ( $ this -> augmentationData [ $ key ] ) ) { $ this -> augmentationData [ $ key ] = $ rowData ; } else { $ this -> augmentationData [ $ key ] = array_merge ( $ this -> augmentationData [ $ key ] , $ rowData ) ; } } } }
Sets the augmentation data for the collection.

Augmentation data is data in an array, keyed by unique identifier which is added
to the model when it is being generated during access.

This avoids the need to cache whole model objects during iteration and filtering.

@param string[] $data
Sets the augmentation data for the collection .