protected function mapAttributes(array &$data)
    {
        $map = $this->attributeMap;
        $out = [];

        foreach ($data as $key => &$value) {
            if (isset($map[$key])) {
                $key = $map[$key];
            }
            $out[$key] = $value;
        }

        return $out;
    }
protected function mapAttributes(array &$data)
    {
        $map = $this->attributeMap;
        $out = [];

        foreach ($data as $key => &$value) {
            if (isset($map[$key])) {
                $key = $map[$key];
            }
            $out[$key] = $value;
        }

        return $out;
    }
protected function mapAttributes ( array & $ data ) { $ map = $ this -> attributeMap ; $ out = [ ] ; foreach ( $ data as $ key => & $ value ) { if ( isset ( $ map [ $ key ] ) ) { $ key = $ map [ $ key ] ; } $ out [ $ key ] = $ value ; } return $ out ; }
Remap attribute keys

@param array $data

@return array
Remap attribute keys