Maileon PHP client  1.5.0
Easily integrate your PHP application with Maileon.
CustomProperty.php
1 <?php
2 
9 {
10  public $key;
11  public $value;
12 
19  function __construct(
20  $key = null,
21  $value = null)
22  {
23  $this->key = $key;
24  $this->value = $value;
25  }
26 
33  function fromXML($xmlElement)
34  {
35  if (isset($xmlElement->key)) { $this->key = (string)$xmlElement->key; }
36  if (isset($xmlElement->value)) { $this->value = (string)$xmlElement->value; }
37  }
38 
44  function toXML() {
45  $xml = new SimpleXMLElement("<?xml version=\"1.0\"?><property></property>");
46 
47  $xml->addChild("key", $this->key);
48  $xml->addChild("value", $this->value);
49 
50  return $xml;
51  }
52 
59  function toString()
60  {
61  return "CustomProperty [key=" . $this->key . ", "
62  . "value=" . $this->value . "]";
63  }
64 }