public function messagePayload($type) { if (isset($this->messageTypeMap[$type])) { return $this->payloadFactory->buildPayload($this->messageTypeMap[$type], null, null, $this->logger); } throw new UnsupportedPayload("No payload found for '{$type}'"); }
/** * 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}'"); }
/** * Build a new IPayload for the given interface. * * @param string * @return IPayload */ protected function buildPayloadForInterface($interface) { return $this->payloadFactory->buildPayload($this->payloadMap->getConcreteType($interface), $this->payloadMap, $this, $this->logger); }