Maileon PHP client
1.5.0
Easily integrate your PHP application with Maileon.
Main Page
Related Pages
Classes
Files
File List
ContactEventList.php
1
<?php
2
8
class
com_maileon_api_contactevents_ContactEventList
extends
com_maileon_api_xml_AbstractXMLWrapper
9
{
10
public
$token;
11
public
$events;
12
16
function
__construct
()
17
{
18
$this->events = array();
19
}
20
27
function
addEvent
($event)
28
{
29
array_push($this->events, $event);
30
}
31
37
function
fromXML
($xmlElement)
38
{
39
}
40
45
function
toXML
()
46
{
47
$xml =
new
SimpleXMLElement(
"<?xml version=\"1.0\"?><events></events>"
);
48
49
// Some fields are mandatory, especially when setting data to the API
50
if
(isset($this->token)) $xml->addChild(
"token"
, $this->token);
51
52
53
if
(count($this->events)) {
54
foreach
($this->events as $event) {
55
com_maileon_api_xml_XMLUtils::appendChild
($xml, $event->toXML());
56
}
57
}
58
59
return
$xml;
60
}
61
66
function
toXMLString
()
67
{
68
$xml = $this->
toXML
();
69
return
$xml->asXML();
70
}
71
76
function
toString
()
77
{
78
79
// Generate standard field string
80
$events =
""
;
81
if
(array_count_values($this->events) > 0) {
82
foreach
($this->events as $event) {
83
$events .= $event->toString() .
","
;
84
}
85
$events = rtrim($events,
','
);
86
}
87
88
return
"ContactEventList [token="
. $this->token .
", events={"
. $events .
"}]"
;
89
}
90
}
com_maileon_api_contactevents_ContactEventList\__construct
__construct()
Definition:
ContactEventList.php:16
com_maileon_api_contactevents_ContactEventList\addEvent
addEvent($event)
Definition:
ContactEventList.php:27
com_maileon_api_contactevents_ContactEventList\toXMLString
toXMLString()
Definition:
ContactEventList.php:66
com_maileon_api_contactevents_ContactEventList
Definition:
ContactEventList.php:8
com_maileon_api_contactevents_ContactEventList\fromXML
fromXML($xmlElement)
Definition:
ContactEventList.php:37
com_maileon_api_contactevents_ContactEventList\toXML
toXML()
Definition:
ContactEventList.php:45
com_maileon_api_xml_AbstractXMLWrapper
Definition:
AbstractXMLWrapper.php:9
com_maileon_api_contactevents_ContactEventList\toString
toString()
Definition:
ContactEventList.php:76
com_maileon_api_xml_XMLUtils\appendChild
static appendChild(SimpleXMLElement $to, SimpleXMLElement $from)
Definition:
XMLUtils.php:18
client
com
maileon
api
contactevents
ContactEventList.php
Generated on Tue Apr 2 2019 16:02:11 for Maileon PHP client by
1.8.9.1