/** * Serialize and sign a command, returning a request object * * @param CommandInterface $command Command to sign * * @return RequestInterface */ protected function getSignedRequest($command) { $request = $command->prepare(); $request->dispatch('request.before_send', array('request' => $request)); return $request; }