public static function generateMetadataHeaders(array $metadata, $prefix = NULL) {
    if (empty($prefix)) {
      $prefix = Container::METADATA_HEADER_PREFIX;
    }
    $headers = array();
    foreach ($metadata as $key => $val) {
      $headers[$prefix . $key] = $val;
    }
    return $headers;
  }
public static function generateMetadataHeaders(array $metadata, $prefix = NULL) {
    if (empty($prefix)) {
      $prefix = Container::METADATA_HEADER_PREFIX;
    }
    $headers = array();
    foreach ($metadata as $key => $val) {
      $headers[$prefix . $key] = $val;
    }
    return $headers;
  }
public static function generateMetadataHeaders ( array $ metadata , $ prefix = NULL ) { if ( empty ( $ prefix ) ) { $ prefix = Container :: METADATA_HEADER_PREFIX ; } $ headers = array ( ) ; foreach ( $ metadata as $ key => $ val ) { $ headers [ $ prefix . $ key ] = $ val ; } return $ headers ; }
Transform a metadata array into headers.

This is used when storing an object in a container.

@param array $metadata
An associative array of metadata. Metadata is not escaped in any
way (there is no codified spec by which to escape), so make sure
that keys are alphanumeric (dashes allowed) and values are
ASCII-armored with no newlines.
@param string $prefix
A prefix for the metadata headers.
@retval array
@return array
An array of headers.
@see http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html#d5e635
@see http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html#d5e700
Transform a metadata array into headers .