/** * Use the IConfig's getConfigKey to get a pair of request/reply payloads. * Type will specify if the request or reply payload should be retrieved. * @param string $type * @return IPayload * @throws UnsupportedPayload */ public function messagePayload($type) { $key = $this->config->getConfigKey(); if (isset($this->messageTypeMap[$key])) { return $this->payloadFactory->buildPayload($this->messageTypeMap[$key][$type], null, null, $this->logger); } throw new UnsupportedPayload("No payload found for '{$key}'"); }