src/S3/Crypto/InstructionFileMetadataStrategy.php
public function load(array $args)
    {
        $result = $this->client->getObject([
            'Bucket' => $args['Bucket'],
            'Key' => $args['Key'] . $this->suffix
        ]);

        $metadataHeaders = json_decode($result['Body'], true);
        $envelope = new MetadataEnvelope();
        $constantValues = MetadataEnvelope::getConstantValues();

        foreach ($constantValues as $constant) {
            if (!empty($metadataHeaders[$constant])) {
                $envelope[$constant] = $metadataHeaders[$constant];
            }
        }

        return $envelope;
    }
public function load(array $args)
    {
        $result = $this->client->getObject([
            'Bucket' => $args['Bucket'],
            'Key' => $args['Key'] . $this->suffix
        ]);

        $metadataHeaders = json_decode($result['Body'], true);
        $envelope = new MetadataEnvelope();
        $constantValues = MetadataEnvelope::getConstantValues();

        foreach ($constantValues as $constant) {
            if (!empty($metadataHeaders[$constant])) {
                $envelope[$constant] = $metadataHeaders[$constant];
            }
        }

        return $envelope;
    }
public function load ( array $ args ) { $ result = $ this -> client -> getObject ( [ 'Bucket' => $ args [ 'Bucket' ] , 'Key' => $ args [ 'Key' ] . $ this -> suffix ] ) ; $ metadataHeaders = json_decode ( $ result [ 'Body' ] , true ) ; $ envelope = new MetadataEnvelope ( ) ; $ constantValues = MetadataEnvelope :: getConstantValues ( ) ; foreach ( $ constantValues as $ constant ) { if ( ! empty ( $ metadataHeaders [ $ constant ] ) ) { $ envelope [ $ constant ] = $ metadataHeaders [ $ constant ] ; } } return $ envelope ; }
Uses the strategy's client to retrieve the instruction file from S3 and generates
a MetadataEnvelope from its contents.

@param array $args Arguments from Command and Result that contains
S3 Object information, relevant headers, and command
configuration.

@return MetadataEnvelope
Uses the strategy s client to retrieve the instruction file from S3 and generates a MetadataEnvelope from its contents .