1 | <?php |
||
18 | class Lift |
||
19 | { |
||
20 | /** |
||
21 | * @var \GuzzleHttp\ClientInterface Unauthenticated client |
||
22 | */ |
||
23 | private $unauthenticatedClient; |
||
24 | |||
25 | /** |
||
26 | * @var \GuzzleHttp\ClientInterface Authenticated client |
||
27 | */ |
||
28 | private $authenticatedClient; |
||
29 | |||
30 | /** |
||
31 | * Constructor. |
||
32 | * |
||
33 | * @param string $account_id The Lift Web Account Identifier. Eg.: MYACCOUNT |
||
34 | * @param string $site_id The Lift Web Site Identifier. Eg.: my-drupal-site |
||
35 | * @param string $public_key The Lift Web Public Key. Not all API keys have |
||
36 | * the same permissions so be mindful which key |
||
37 | * you are using |
||
38 | * @param string $secret_key The Lift Web Secret Key belonging to the Public |
||
39 | * Key |
||
40 | * @param array $config Additional configs |
||
41 | */ |
||
42 | 123 | public function __construct( |
|
85 | |||
86 | /** |
||
87 | * Get a handler that adds lift account id and site id. |
||
88 | * |
||
89 | * @param string $account_id The Lift Web Account Identifier. Eg.: MYACCOUNT |
||
90 | * @param string $site_id The Lift Web Site Identifier. Eg.: my-drupal-site |
||
91 | * @return function The handler that adds Lift account id and site id |
||
92 | */ |
||
93 | private function getAccountAndSiteIdHandler($account_id, $site_id) |
||
118 | |||
119 | /** |
||
120 | * Pings the service to ensure that it is available. |
||
121 | * |
||
122 | * @return mixed the value encoded in the JSON. |
||
123 | */ |
||
124 | 3 | public function ping() |
|
132 | |||
133 | /** |
||
134 | * Get the Slot Manager. |
||
135 | * |
||
136 | * @return \Acquia\LiftClient\Manager\SlotManager |
||
137 | */ |
||
138 | 24 | public function getSlotManager() |
|
142 | |||
143 | /** |
||
144 | * Get the Slot Manager. |
||
145 | * |
||
146 | * @return \Acquia\LiftClient\Manager\GoalManager |
||
147 | */ |
||
148 | 33 | public function getGoalManager() |
|
152 | |||
153 | /** |
||
154 | * Get the Segment Manager. |
||
155 | * |
||
156 | * @return \Acquia\LiftClient\Manager\SegmentManager |
||
157 | */ |
||
158 | 6 | public function getSegmentManager() |
|
162 | |||
163 | /** |
||
164 | * Get the Rules Manager. |
||
165 | * |
||
166 | * @return \Acquia\LiftClient\Manager\RuleManager |
||
167 | */ |
||
168 | 36 | public function getRuleManager() |
|
172 | |||
173 | /** |
||
174 | * Get the Capture Manager. |
||
175 | * |
||
176 | * @return \Acquia\LiftClient\Manager\CaptureManager |
||
177 | */ |
||
178 | 12 | public function getCaptureManager() |
|
182 | |||
183 | /** |
||
184 | * Get the Decide Manager. |
||
185 | * |
||
186 | * @return \Acquia\LiftClient\Manager\DecideManager |
||
187 | */ |
||
188 | 9 | public function getDecideManager() |
|
192 | |||
193 | } |
||
194 |