Maileon PHP client
1.2.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
$TIMESTAMP;
19
public
static
$JSON;
20
21
private
static
$initialized =
false
;
22
23
// TODO use a more sensible name for this concept, e.g. "type descriptor"
30
public
$value
;
31
32
static
function
init()
33
{
34
if
(self::$initialized ==
false
) {
35
self::$STRING =
new
com_maileon_api_transactions_DataType
(
"string"
);
36
self::$DOUBLE =
new
com_maileon_api_transactions_DataType
(
"double"
);
37
self::$FLOAT =
new
com_maileon_api_transactions_DataType
(
"float"
);
38
self::$INTEGER =
new
com_maileon_api_transactions_DataType
(
"integer"
);
39
self::$BOOLEAN =
new
com_maileon_api_transactions_DataType
(
"boolean"
);
40
self::$TIMESTAMP =
new
com_maileon_api_transactions_DataType
(
"timestamp"
);
41
self::$JSON =
new
com_maileon_api_transactions_DataType
(
"json"
);
42
self::$initialized =
true
;
43
}
44
}
45
53
function
__construct
(
$value
)
54
{
55
$this->value =
$value
;
56
}
57
63
function
getValue
()
64
{
65
return
$this->value
;
66
}
67
77
static
function
getDataType
(
$value
)
78
{
79
switch
(
$value
) {
80
case
"string"
:
81
return
self::$STRING;
82
case
"double"
:
83
return
self::$DOUBLE;
84
case
"float"
:
85
return
self::$FLOAT;
86
case
"integer"
:
87
return
self::$INTEGER;
88
case
"boolean"
:
89
return
self::$BOOLEAN;
90
case
"timestamp"
:
91
return
self::$TIMESTAMP;
92
case
"json"
:
93
return
self::$JSON;
94
95
default
:
96
return
null;
97
}
98
}
99
}
com_maileon_api_transactions_DataType\getDataType
static getDataType($value)
Definition:
DataType.php:77
com_maileon_api_transactions_DataType
Definition:
DataType.php:11
com_maileon_api_transactions_DataType\getValue
getValue()
Definition:
DataType.php:63
com_maileon_api_transactions_DataType\$value
$value
Definition:
DataType.php:30
com_maileon_api_transactions_DataType\__construct
__construct($value)
Definition:
DataType.php:53
client
com
maileon
api
transactions
DataType.php
Generated on Mon Jan 16 2017 15:09:37 for Maileon PHP client by
1.8.9.1