* stack.
*
* @param $helperInstance An instance of a Helper class
- * @param $protocol Name of used protocol (TCP/UDP)
* @return void
*/
- public function enqueueRawDataFromTemplate (Helper $helperInstance, $protocolName) {
+ public function enqueueRawDataFromTemplate (Helper $helperInstance) {
+ // Get protocol instance for recipient
+ $protocolInstance = ProtocolHandlerFactory::createProtocolFromRecipientHelper($helperInstance);
+
// Get the raw content ...
$content = $helperInstance->getTemplateInstance()->getRawTemplateData();
//* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('content(' . strlen($content) . ')=' . $content);
$this->getStackInstance()->pushNamed(self::STACKER_NAME_UNDECLARED, array(
self::PACKAGE_DATA_SENDER => $this->getSessionId(),
self::PACKAGE_DATA_RECIPIENT => $helperInstance->getRecipientType(),
- self::PACKAGE_DATA_PROTOCOL => $protocolName,
+ self::PACKAGE_DATA_PROTOCOL => $protocolInstance->getProtocolName(),
self::PACKAGE_DATA_CONTENT => $packageContent,
self::PACKAGE_DATA_STATUS => self::PACKAGE_STATUS_NEW,
self::PACKAGE_DATA_SIGNATURE => $this->generatePackageSignature($packageContent, $this->getSessionId())