Maileon PHP client  1.5.0
Easily integrate your PHP application with Maileon.
Block.php
1 <?php
2 
10 {
14  public $timestamp;
15 
19  public $contact;
20 
24  public $oldStatus;
25 
29  public $newStatus;
30 
34  public $reason;
35 
36 
41  function toString()
42  {
43  return "Block [timestamp=" . $this->timestamp .
44  ", contact=" . $this->contact->toString() .
45  ", oldstatus=" . $this->oldStatus .
46  ", newstatus=" . $this->newStatus .
47  ", reason=" . $this->reason . "]";
48  }
49 
54  function toCsvString()
55  {
56  return "block;" . $this->timestamp .
57  ";" . $this->contact->toCsvString() .
58  ";" . $this->oldStatus .
59  ";" . $this->newStatus .
60  ";" . $this->reason;
61  }
62 
69  function fromXML($xmlElement)
70  {
71  $this->contact = new com_maileon_api_reports_ReportContact();
72  $this->contact->fromXML($xmlElement->contact);
73 
74  if (isset($xmlElement->timestamp)) $this->timestamp = $xmlElement->timestamp;
75  if (isset($xmlElement->old_status)) $this->oldStatus = $xmlElement->old_status;
76  if (isset($xmlElement->new_status)) $this->newStatus = $xmlElement->new_status;
77  if (isset($xmlElement->reason)) $this->reason = $xmlElement->reason;
78  }
79 
86  function toXML()
87  {
88  // Not implemented yet.
89  }
90 }