private static function decodeMap($additional, &$bytes)
    {
        $length = self::decodeIntValue($additional, $bytes);

        $map = array();
        for ($i = 0; $i < $length; $i++)
        {
            $key = self::recursiveDecode($bytes);
            if (array_key_exists($key, $map))
            {
                throw new CborException("Map contains multiple keys with same value.");
            }

            $value = self::recursiveDecode($bytes);
            $map[$key] = $value;
        }

        return $map;
    }
private static function decodeMap($additional, &$bytes)
    {
        $length = self::decodeIntValue($additional, $bytes);

        $map = array();
        for ($i = 0; $i < $length; $i++)
        {
            $key = self::recursiveDecode($bytes);
            if (array_key_exists($key, $map))
            {
                throw new CborException("Map contains multiple keys with same value.");
            }

            $value = self::recursiveDecode($bytes);
            $map[$key] = $value;
        }

        return $map;
    }
private static function decodeMap ( $ additional , & $ bytes ) { $ length = self :: decodeIntValue ( $ additional , $ bytes ) ; $ map = array ( ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ key = self :: recursiveDecode ( $ bytes ) ; if ( array_key_exists ( $ key , $ map ) ) { throw new CborException ( "Map contains multiple keys with same value." ) ; } $ value = self :: recursiveDecode ( $ bytes ) ; $ map [ $ key ] = $ value ; } return $ map ; }
Decodes a CBOR map, based on the first byte and additional data.

@param int $additional Additional type.
@param array $bytes Remaining bytes in string.
@throws CborException If keys in map are overwritten.
@return array Map of decoded values.
Decodes a CBOR map based on the first byte and additional data .