Aws\S3\S3Client::getSaveAsParameter PHP Method

getSaveAsParameter() private method

Provides a middleware that supports the SaveAs parameter.
private getSaveAsParameter ( ) : Closure
return Closure
    private function getSaveAsParameter()
    {
        return static function (callable $handler) {
            return function (Command $command, $request = null) use($handler) {
                if ($command->getName() === 'GetObject' && isset($command['SaveAs'])) {
                    $command['@http']['sink'] = $command['SaveAs'];
                    unset($command['SaveAs']);
                }
                return $handler($command, $request);
            };
        };
    }