Maileon PHP client  1.2.5
Easily integrate your PHP application with Maileon.
Unsubscriber.php
1 <?php
2 
10 {
14  public $timestamp;
15 
19  public $contact;
20 
24  public $mailingId;
25 
29  public $source;
30 
35  function toString()
36  {
37  return "Unsubscriber [timestamp=" . $this->timestamp .
38  ", contact=" . $this->contact->toString() .
39  ", mailingId=" . $this->mailingId .
40  ", source=" . $this->source . "]";
41  }
42 
47  function toCsvString()
48  {
49  return $this->timestamp .
50  ";" . $this->contact->toCsvString() .
51  ";" . $this->mailingId .
52  ";" . $this->source;
53  }
54 
61  function fromXML($xmlElement)
62  {
63  $this->contact = new com_maileon_api_reports_ReportContact();
64  $this->contact->fromXML($xmlElement->contact);
65 
66  if (isset($xmlElement->mailing_id)) $this->mailingId = $xmlElement->mailing_id;
67  if (isset($xmlElement->source)) $this->source = $xmlElement->source;
68  if (isset($xmlElement->timestamp)) $this->timestamp = $xmlElement->timestamp;
69  }
70 
77  function toXML()
78  {
79  // Not implemented yet.
80  }
81 }