Class UploadBodyListener
Prepares the body parameter of a command such that the parameter is more flexible (e.g. accepts file handles) with the value it accepts but converts it to the correct format for the command. Also looks for a "Filename" parameter.
- Aws\Common\Client\UploadBodyListener implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Methods summary
-
public
__construct ( array $commands, string $bodyParameter = 'Body', string $sourceParameter = 'SourceFile' )
-
public static
getSubscribedEvents ( )
-
public
onCommandBeforePrepare ( Guzzle\Common\Event $event )
Converts filenames and file handles into EntityBody objects before the command is validated
Methods detail
#
public
__construct( array $commands, string $bodyParameter = 'Body', string $sourceParameter = 'SourceFile' )
Parameters
- $commands
array
$commands The commands to modify- $bodyParameter
string
$bodyParameter The key for the body parameter- $sourceParameter
string
$sourceParameter The key for the source file parameter
Converts filenames and file handles into EntityBody objects before the command is validated
Parameters
- $event
Guzzle\Common\Event
$event Event emitted
Throws
Magic methods summary
Properties summary
protected
array
|
$commands |
#
The names of the commands of which to modify the body parameter |
protected
string
|
$bodyParameter |
#
The key for the upload body parameter |
protected
string
|
$sourceParameter |
#
The key for the source file parameter |