Maileon PHP client  1.5.5
Easily integrate your PHP application with Maileon.
TargetGroup.php
1 <?php
2 
7 {
8 
9  public $id;
10  public $name;
11  public $author;
12  public $state;
13  public $type;
14  public $contactFilterName;
15  public $contactFilterId;
16  public $evaluated;
17  public $created;
18  public $updated;
19  public $countActiveContacts;
20  public $countContacts;
21 
38  function __construct(
39  $id = 0,
40  $name = "",
41  $author = "",
42  $state = "",
43  $type = "",
44  $contactFilterName = "",
45  $contactFilterId = 0,
46  $evaluated = "1970-01-01 00:00:00",
47  $created = "1970-01-01 00:00:00",
48  $updated = "1970-01-01 00:00:00",
49  $countActiveContacts = 0,
50  $countContacts = 0)
51  {
52  $this->id = $id;
53  $this->name = $name;
54  $this->author = $author;
55  $this->state = $state;
56  $this->type = $type;
57  $this->contactFilterName = $contactFilterName;
58  $this->contactFilterId = $contactFilterId;
59  $this->evaluated = $evaluated;
60  $this->created = $created;
61  $this->updated = $updated;
62  $this->countActiveContacts = $countActiveContacts;
63  $this->countContacts = $countContacts;
64  }
65 
72  function fromXML($xmlElement)
73  {
74 
75  $this->id = $xmlElement->id;
76  $this->name = $xmlElement->name;
77  $this->author = $xmlElement->author;
78  $this->state = $xmlElement->state;
79  $this->type = $xmlElement->type;
80  $this->contactFilterName = $xmlElement->contact_filter_name;
81  $this->contactFilterId = $xmlElement->contact_filter_id;
82  $this->evaluated = $xmlElement->evaluated;
83  $this->created = $xmlElement->created;
84  $this->updated = $xmlElement->updated;
85  $this->countActiveContacts = $xmlElement->count_active_contacts;
86  $this->countContacts = $xmlElement->count_contacts;
87 
88  }
89 
94  function toXML()
95  {
96  $xml = new SimpleXMLElement("<?xml version=\"1.0\"?><targetgroup></targetgroup>");
97 
98  $xml->addChild("id", $this->id);
99  $xml->addChild("name", $this->name);
100  $xml->addChild("author", $this->author);
101  $xml->addChild("state", $this->state);
102  $xml->addChild("type", $this->type);
103  $xml->addChild("contact_filter_name", $this->contactFilterName);
104  $xml->addChild("contact_filter_id", $this->contactFilterId);
105  $xml->addChild("evaluated", $this->evaluated);
106  $xml->addChild("created", $this->created);
107  $xml->addChild("updated", $this->updated);
108  $xml->addChild("count_active_contacts", $this->countActiveContacts);
109  $xml->addChild("count_contacts", $this->countContacts);
110 
111  return $xml;
112  }
113 
120  function toXMLString()
121  {
122  $xml = $this->toXML();
123  return $xml->asXML();
124  }
125 
130  function toString()
131  {
132  return "ContactFilter [" .
133  "id=" . $this->id .
134  ", name=" . $this->name .
135  ", author=" . $this->author .
136  ", state=" . $this->state .
137  ", type=" . $this->type .
138  ", contactFilterName=" . $this->contactFilterName .
139  ", contactFilterId=" . $this->contactFilterId .
140  ", evaluated=" . $this->evaluated .
141  ", created=" . $this->created .
142  ", updated=" . $this->updated .
143  ", countActiveContacts=" . $this->countActiveContacts .
144  ", countContacts=" . $this->countContacts .
145  "]";
146  }
147 }
__construct($id=0, $name="", $author="", $state="", $type="", $contactFilterName="", $contactFilterId=0, $evaluated="1970-01-01 00:00:00", $created="1970-01-01 00:00:00", $updated="1970-01-01 00:00:00", $countActiveContacts=0, $countContacts=0)
Definition: TargetGroup.php:38