protected static function extractMetaData(array $headers) {
    $metadata = [];
    foreach($headers as $key => $value) {
      if (StringUtil::startsWith(strtolower($key),
                                 static::METADATA_HEADER_PREFIX)) {
        $metadata_key = substr($key, strlen(static::METADATA_HEADER_PREFIX));
        $metadata[$metadata_key] = $value;
      }
    }

    return $metadata;
  }
protected static function extractMetaData(array $headers) {
    $metadata = [];
    foreach($headers as $key => $value) {
      if (StringUtil::startsWith(strtolower($key),
                                 static::METADATA_HEADER_PREFIX)) {
        $metadata_key = substr($key, strlen(static::METADATA_HEADER_PREFIX));
        $metadata[$metadata_key] = $value;
      }
    }

    return $metadata;
  }
protected static function extractMetaData ( array $ headers ) { $ metadata = [ ] ; foreach ( $ headers as $ key => $ value ) { if ( StringUtil :: startsWith ( strtolower ( $ key ) , static :: METADATA_HEADER_PREFIX ) ) { $ metadata_key = substr ( $ key , strlen ( static :: METADATA_HEADER_PREFIX ) ) ; $ metadata [ $ metadata_key ] = $ value ; } } return $ metadata ; }
Extract metadata from HTTP response headers.

Finds all headers that begin with METADATA_HEADER_PREFIX (x-goog-meta-),
strips off the prefix, and creates an associative array.

@param array $headers
Associative array of HTTP headers.
@return array
Array of parsed metadata headers.
Extract metadata from HTTP response headers .