public function getData(kHttpNotificationDispatchJobData $jobData = null) { $coreObject = unserialize($this->coreObject); $apiObject = new $this->apiObjectType(); /* @var $apiObject KalturaObject */ $apiObject->fromObject($coreObject); $httpNotificationTemplate = EventNotificationTemplatePeer::retrieveByPK($jobData->getTemplateId()); $notification = new KalturaHttpNotification(); $notification->object = $apiObject; $notification->eventObjectType = kPluginableEnumsManager::coreToApi('EventNotificationEventObjectType', $httpNotificationTemplate->getObjectType()); $notification->eventNotificationJobId = $jobData->getJobId(); $notification->templateId = $httpNotificationTemplate->getId(); $notification->templateName = $httpNotificationTemplate->getName(); $notification->templateSystemName = $httpNotificationTemplate->getSystemName(); $notification->eventType = $httpNotificationTemplate->getEventType(); $data = ''; switch ($this->format) { case KalturaResponseType::RESPONSE_TYPE_XML: $serializer = new KalturaXmlSerializer($this->ignoreNull); $data = '<notification>' . $serializer->serialize($notification) . '</notification>'; break; case KalturaResponseType::RESPONSE_TYPE_PHP: $serializer = new KalturaPhpSerializer($this->ignoreNull); $data = $serializer->serialize($notification); break; case KalturaResponseType::RESPONSE_TYPE_JSON: $serializer = new KalturaJsonSerializer($this->ignoreNull); $data = $serializer->serialize($notification); break; } return "data={$data}"; }