Maileon PHP client  1.2.5
Easily integrate your PHP application with Maileon.
Bounce.php
1 <?php
2 
10 {
14  public $timestamp;
15 
19  public $contact;
20 
24  public $mailingId;
25 
30  public $type;
31 
36  public $statusCode;
37 
42  public $source;
43 
48  function toString()
49  {
50  return "Bounce [timestamp=" . $this->timestamp .
51  ", contact=" . $this->contact->toString() .
52  ", mailingId=" . $this->mailingId .
53  ", type=" . $this->type .
54  ", statusCode=" . $this->statusCode .
55  ", source=" . $this->source . "]";
56  }
57 
62  function toCsvString()
63  {
64  return $this->timestamp .
65  ";" . $this->contact->toCsvString() .
66  ";" . $this->mailingId .
67  ";" . $this->type .
68  ";" . $this->statusCode .
69  ";" . $this->source;
70  }
71 
78  function fromXML($xmlElement)
79  {
80  $this->contact = new com_maileon_api_reports_ReportContact();
81  $this->contact->fromXML($xmlElement->contact);
82 
83  if (isset($xmlElement->mailing_id)) $this->mailingId = $xmlElement->mailing_id;
84  if (isset($xmlElement->timestamp)) $this->timestamp = $xmlElement->timestamp;
85  if (isset($xmlElement->type)) $this->type = $xmlElement->type;
86  if (isset($xmlElement->status_code)) $this->statusCode = $xmlElement->status_code;
87  if (isset($xmlElement->source)) $this->source = $xmlElement->source;
88  }
89 
96  function toXML()
97  {
98  // Not implemented yet.
99  }
100 }