protected function mapID($id) {
        $idArray = (array)$id;

        $result = [];
        foreach ($this->getPrimaryKey() as $i => $column) {
            if (isset($idArray[$i])) {
                $result[$column] = $idArray[$i];
            } elseif (isset($idArray[$column])) {
                $result[$column] = $idArray[$column];
            } else {
                $result[$column] = null;
            }
        }

        return $result;
    }
protected function mapID($id) {
        $idArray = (array)$id;

        $result = [];
        foreach ($this->getPrimaryKey() as $i => $column) {
            if (isset($idArray[$i])) {
                $result[$column] = $idArray[$i];
            } elseif (isset($idArray[$column])) {
                $result[$column] = $idArray[$column];
            } else {
                $result[$column] = null;
            }
        }

        return $result;
    }
protected function mapID ( $ id ) { $ idArray = ( array ) $ id ; $ result = [ ] ; foreach ( $ this -> getPrimaryKey ( ) as $ i => $ column ) { if ( isset ( $ idArray [ $ i ] ) ) { $ result [ $ column ] = $ idArray [ $ i ] ; } elseif ( isset ( $ idArray [ $ column ] ) ) { $ result [ $ column ] = $ idArray [ $ column ] ; } else { $ result [ $ column ] = null ; } } return $ result ; }
Map primary key values to the primary key name.

@param mixed $id An ID value or an array of ID values. If an array is passed and the model has a mult-column
primary key then all of the values must be in order.
@return array Returns an associative array mapping column names to values.
Map primary key values to the primary key name .