src/DataStore/src/DataStore/CsvBase.php
protected function createNewItem($itemData)
    {
        $item = array_flip($this->columns);

        foreach ($item as $key => $value) {
            if (isset($itemData[$key])) {
                $item[$key] = $itemData[$key];
            } else {
                $item[$key] = null;
            }
        }

        return $item;
    }
protected function createNewItem($itemData)
    {
        $item = array_flip($this->columns);

        foreach ($item as $key => $value) {
            if (isset($itemData[$key])) {
                $item[$key] = $itemData[$key];
            } else {
                $item[$key] = null;
            }
        }

        return $item;
    }
protected function createNewItem ( $ itemData ) { $ item = array_flip ( $ this -> columns ) ; foreach ( $ item as $ key => $ value ) { if ( isset ( $ itemData [ $ key ] ) ) { $ item [ $ key ] = $ itemData [ $ key ] ; } else { $ item [ $ key ] = null ; } } return $ item ; }
Creates a new item, combines data with the column headings
@param $itemData
@return array
Creates a new item combines data with the column headings