src/Common/Internal/ServiceRestProxy.php
public function generateMetadataHeaders(array $metadata)
    {
        $metadataHeaders = [];

        if (is_array($metadata) && !is_null($metadata)) {
            foreach ($metadata as $key => $value) {
                $headerName = Resources::X_MS_META_HEADER_PREFIX;
                if (strpos($value, "\r") !== false
                    || strpos($value, "\n") !== false
                ) {
                    throw new \InvalidArgumentException(Resources::INVALID_META_MSG);
                }

                $headerName .= strtolower($key);
                $metadataHeaders[$headerName] = $value;
            }
        }

        return $metadataHeaders;
    }
public function generateMetadataHeaders(array $metadata)
    {
        $metadataHeaders = [];

        if (is_array($metadata) && !is_null($metadata)) {
            foreach ($metadata as $key => $value) {
                $headerName = Resources::X_MS_META_HEADER_PREFIX;
                if (strpos($value, "\r") !== false
                    || strpos($value, "\n") !== false
                ) {
                    throw new \InvalidArgumentException(Resources::INVALID_META_MSG);
                }

                $headerName .= strtolower($key);
                $metadataHeaders[$headerName] = $value;
            }
        }

        return $metadataHeaders;
    }
public function generateMetadataHeaders ( array $ metadata ) { $ metadataHeaders = [ ] ; if ( is_array ( $ metadata ) && ! is_null ( $ metadata ) ) { foreach ( $ metadata as $ key => $ value ) { $ headerName = Resources :: X_MS_META_HEADER_PREFIX ; if ( strpos ( $ value , "\r" ) !== false || strpos ( $ value , "\n" ) !== false ) { throw new \ InvalidArgumentException ( Resources :: INVALID_META_MSG ) ; } $ headerName .= strtolower ( $ key ) ; $ metadataHeaders [ $ headerName ] = $ value ; } } return $ metadataHeaders ; }
Generates metadata headers by prefixing each element with 'x-ms-meta'.

@param array $metadata user defined metadata

@return array
Generates metadata headers by prefixing each element with x - ms - meta .