nextHandler = $nextHandler; $this->signature = new Signature($accessKey, $secretKey); } public function __invoke(RequestInterface $request, array $options) { $fn = $this->nextHandler; return $fn($this->signature->signRequest($request), $options); } }