Maileon PHP client
1.5.5
Easily integrate your PHP application with Maileon.
Main Page
Related Pages
Classes
Files
File List
DataType.php
1
<?php
2
11
class
com_maileon_api_transactions_DataType
12
{
13
public
static
$STRING;
14
public
static
$DOUBLE;
15
public
static
$FLOAT;
16
public
static
$INTEGER;
17
public
static
$BOOLEAN;
18
public
static
$DATE;
19
public
static
$TIMESTAMP;
20
public
static
$JSON;
21
22
private
static
$initialized =
false
;
23
24
// TODO use a more sensible name for this concept, e.g. "type descriptor"
31
public
$value
;
32
33
static
function
init()
34
{
35
if
(self::$initialized ==
false
) {
36
self::$STRING =
new
com_maileon_api_transactions_DataType
(
"string"
);
37
self::$DOUBLE =
new
com_maileon_api_transactions_DataType
(
"double"
);
38
self::$FLOAT =
new
com_maileon_api_transactions_DataType
(
"float"
);
39
self::$INTEGER =
new
com_maileon_api_transactions_DataType
(
"integer"
);
40
self::$BOOLEAN =
new
com_maileon_api_transactions_DataType
(
"boolean"
);
41
self::$TIMESTAMP =
new
com_maileon_api_transactions_DataType
(
"timestamp"
);
42
self::$DATE =
new
com_maileon_api_transactions_DataType
(
"date"
);
43
self::$JSON =
new
com_maileon_api_transactions_DataType
(
"json"
);
44
self::$initialized =
true
;
45
}
46
}
47
55
function
__construct
(
$value
)
56
{
57
$this->value =
$value
;
58
}
59
65
function
getValue
()
66
{
67
return
$this->value
;
68
}
69
79
static
function
getDataType
(
$value
)
80
{
81
switch
(
$value
) {
82
case
"string"
:
83
return
self::$STRING;
84
case
"double"
:
85
return
self::$DOUBLE;
86
case
"float"
:
87
return
self::$FLOAT;
88
case
"integer"
:
89
return
self::$INTEGER;
90
case
"boolean"
:
91
return
self::$BOOLEAN;
92
case
"timestamp"
:
93
return
self::$TIMESTAMP;
94
case
"date"
:
95
return
self::$DATE;
96
case
"json"
:
97
return
self::$JSON;
98
99
default
:
100
return
null;
101
}
102
}
103
}
com_maileon_api_transactions_DataType\getDataType
static getDataType($value)
Definition:
DataType.php:79
com_maileon_api_transactions_DataType
Definition:
DataType.php:11
com_maileon_api_transactions_DataType\getValue
getValue()
Definition:
DataType.php:65
com_maileon_api_transactions_DataType\$value
$value
Definition:
DataType.php:31
com_maileon_api_transactions_DataType\__construct
__construct($value)
Definition:
DataType.php:55
client
com
maileon
api
transactions
DataType.php
Generated on Mon Jan 20 2020 09:32:53 for Maileon PHP client by
1.8.9.1