$value) { $args['Metadata'][$header] = $value; } return $args; } /** * Generates a MetadataEnvelope according to the metadata headers from the * GetObject result. * * @param array $args Arguments from Command and Result that contains * S3 Object information, relevant headers, and command * configuration. * * @return MetadataEnvelope */ public function load(array $args) { $envelope = new MetadataEnvelope(); $constantValues = MetadataEnvelope::getConstantValues(); foreach ($constantValues as $constant) { if (!empty($args['Metadata'][$constant])) { $envelope[$constant] = $args['Metadata'][$constant]; } } return $envelope; } }