1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Acquia\LiftClient\Entity; |
4
|
|
|
|
5
|
|
|
class DecideResponse extends CapturesBase |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* Gets the 'touch_identifier' parameter. |
9
|
|
|
* |
10
|
|
|
* @throws \Acquia\LiftClient\Exception\LiftSdkException |
11
|
|
|
* |
12
|
|
|
* @return string |
13
|
|
|
*/ |
14
|
|
|
public function getTouchIdentifier() |
15
|
|
|
{ |
16
|
|
|
return $this->getEntityValue('touch_identifier', ''); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Gets the 'identity' parameter. |
21
|
|
|
* |
22
|
|
|
* @throws \Acquia\LiftClient\Exception\LiftSdkException |
23
|
|
|
* |
24
|
|
|
* @return string |
25
|
|
|
*/ |
26
|
|
|
public function getIdentity() |
27
|
|
|
{ |
28
|
|
|
return $this->getEntityValue('identity', ''); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Gets the 'identity_source' parameter. |
33
|
|
|
* |
34
|
|
|
* Type of visitor's primary identity information. Specific string (account, email, |
35
|
|
|
* facebook, twitter, tracking, name) or custom identifier type |
36
|
|
|
* |
37
|
|
|
* @throws \Acquia\LiftClient\Exception\LiftSdkException |
38
|
|
|
* |
39
|
|
|
* @return string |
40
|
|
|
*/ |
41
|
|
|
public function getIdentitySource() |
42
|
|
|
{ |
43
|
|
|
return $this->getEntityValue('identity_source', ''); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Gets the 'segments' parameter. |
48
|
|
|
* |
49
|
|
|
* @return Segment[] |
50
|
|
|
*/ |
51
|
|
View Code Duplication |
public function getMatchedSegments() |
52
|
|
|
{ |
53
|
|
|
$ret = []; |
54
|
|
|
$segments = $this->getEntityValue('segments', []); |
55
|
|
|
foreach ($segments as $segment) { |
56
|
|
|
$ret[] = new Segment($segment); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
return $ret; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* gets the 'set_do_not_track' parameter. |
64
|
|
|
* |
65
|
|
|
* Flag to indicate whether the person should not be tracked |
66
|
|
|
* |
67
|
|
|
* @throws \Acquia\LiftClient\Exception\LiftSdkException |
68
|
|
|
* |
69
|
|
|
* @return bool |
70
|
|
|
*/ |
71
|
|
|
public function getSetDoNotTrack() |
72
|
|
|
{ |
73
|
|
|
return $this->getEntityValue('set_do_not_track', false); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Gets the 'matched_segments' parameter. |
78
|
|
|
* |
79
|
|
|
* @return Segment[] |
80
|
|
|
*/ |
81
|
|
|
public function getDecisions() |
82
|
|
|
{ |
83
|
|
|
$ret = []; |
84
|
|
|
$decisions = $this->getEntityValue('decisions', []); |
85
|
|
|
foreach ($decisions as $decision) { |
86
|
|
|
$ret[] = new Decision($decision); |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
return $ret; |
90
|
|
|
} |
91
|
|
|
} |
92
|
|
|
|