/** * Allows modules to alter an S3 command after it has been created. * * @param \Guzzle\Service\Command\CommandInterface $command * The command that was created. */ function hook_amazons3_command_alter(\Guzzle\Service\Command\CommandInterface $command) { if ($command->getName('HeadObject')) { $command->setOnComplete(function () { watchdog('amazons3', 'HeadObject was called.'); }); } }