public function __construct(\SimpleXMLElement $xml = null) { parent::__construct($xml); if (is_null($xml)) { return; } $this->fromEmail = (string) $xml->fromEmail; $this->fromName = (string) $xml->fromName; if (!empty($xml->to)) { $this->to = \Kaltura\Client\ParseUtils::unmarshalObject($xml->to, "KalturaEmailNotificationRecipientJobData"); } if (!empty($xml->cc)) { $this->cc = \Kaltura\Client\ParseUtils::unmarshalObject($xml->cc, "KalturaEmailNotificationRecipientJobData"); } if (!empty($xml->bcc)) { $this->bcc = \Kaltura\Client\ParseUtils::unmarshalObject($xml->bcc, "KalturaEmailNotificationRecipientJobData"); } if (!empty($xml->replyTo)) { $this->replyTo = \Kaltura\Client\ParseUtils::unmarshalObject($xml->replyTo, "KalturaEmailNotificationRecipientJobData"); } if (count($xml->priority)) { $this->priority = (int) $xml->priority; } $this->confirmReadingTo = (string) $xml->confirmReadingTo; $this->hostname = (string) $xml->hostname; $this->messageID = (string) $xml->messageID; if (empty($xml->customHeaders)) { $this->customHeaders = array(); } else { $this->customHeaders = \Kaltura\Client\ParseUtils::unmarshalArray($xml->customHeaders, "KalturaKeyValue"); } }
public function __construct(\SimpleXMLElement $xml = null) { parent::__construct($xml); if (is_null($xml)) { return; } $this->url = (string) $xml->url; if (count($xml->method)) { $this->method = (int) $xml->method; } $this->data = (string) $xml->data; if (count($xml->timeout)) { $this->timeout = (int) $xml->timeout; } if (count($xml->connectTimeout)) { $this->connectTimeout = (int) $xml->connectTimeout; } $this->username = (string) $xml->username; $this->password = (string) $xml->password; if (count($xml->authenticationMethod)) { $this->authenticationMethod = (int) $xml->authenticationMethod; } if (count($xml->sslVersion)) { $this->sslVersion = (int) $xml->sslVersion; } $this->sslCertificate = (string) $xml->sslCertificate; $this->sslCertificateType = (string) $xml->sslCertificateType; $this->sslCertificatePassword = (string) $xml->sslCertificatePassword; $this->sslEngine = (string) $xml->sslEngine; $this->sslEngineDefault = (string) $xml->sslEngineDefault; $this->sslKeyType = (string) $xml->sslKeyType; $this->sslKey = (string) $xml->sslKey; $this->sslKeyPassword = (string) $xml->sslKeyPassword; if (empty($xml->customHeaders)) { $this->customHeaders = array(); } else { $this->customHeaders = \Kaltura\Client\ParseUtils::unmarshalArray($xml->customHeaders, "KalturaKeyValue"); } if (empty($xml->contentParameters)) { $this->contentParameters = array(); } else { $this->contentParameters = \Kaltura\Client\ParseUtils::unmarshalArray($xml->contentParameters, "KalturaKeyValue"); } }
/** * Dispatch event notification object by id * * * @return int */ function dispatch($id, \Kaltura\Client\Plugin\EventNotification\Type\EventNotificationDispatchJobData $data) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "data", $data->toParams()); $this->client->queueServiceActionCall("eventnotification_eventnotificationtemplate", "dispatch", null, $kparams); if ($this->client->isMultiRequest()) { return $this->client->getMultiRequestResult(); } $resultXml = $this->client->doQueue(); $resultXmlObject = new \SimpleXMLElement($resultXml); \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result); $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result); return $resultObject; }