1 | <?php |
||
8 | abstract class AbstractAccessList |
||
9 | { |
||
10 | /** |
||
11 | * Dependencies. |
||
12 | */ |
||
13 | private $request; |
||
14 | private $dictionary; |
||
15 | private $apiClient; |
||
16 | private $classUtility; |
||
17 | |||
18 | /** |
||
19 | * @throws \Exception |
||
20 | * |
||
21 | * @return mixed |
||
22 | */ |
||
23 | 18 | protected function getAccessControlList() |
|
27 | |||
28 | /** |
||
29 | * @param $sublistKey |
||
30 | * |
||
31 | * @throws \Exception |
||
32 | * |
||
33 | * @return mixed |
||
34 | */ |
||
35 | 18 | protected function getSubAccessControlList($sublistKey) |
|
46 | |||
47 | /** |
||
48 | * @param array $list |
||
49 | * |
||
50 | * @throws \Exception |
||
51 | * |
||
52 | * @return bool |
||
53 | */ |
||
54 | 9 | protected function isEmailInList(array $list): bool |
|
61 | |||
62 | /** |
||
63 | * Check if email is white listed or black listed |
||
64 | * If userEmail list is not set, return true for whitelist and false for blacklist. |
||
65 | * |
||
66 | * @throws \Exception |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | 12 | protected function checkEmail(): bool |
|
82 | |||
83 | /** |
||
84 | * @param string $requestKey |
||
85 | * @param string $listKey |
||
86 | * @param string $subListKey |
||
87 | * |
||
88 | * @throws \Exception |
||
89 | * |
||
90 | * @return bool|null |
||
91 | */ |
||
92 | 12 | protected function findInListByRequestKey(string $requestKey, string $listKey, string $subListKey) |
|
108 | |||
109 | /** |
||
110 | * @return mixed |
||
111 | */ |
||
112 | 18 | protected function getShortClassName() |
|
116 | |||
117 | /** |
||
118 | * @return mixed |
||
119 | */ |
||
120 | 19 | public function getRequest() |
|
124 | |||
125 | /** |
||
126 | * @param mixed $request |
||
127 | */ |
||
128 | 22 | public function setRequest($request) |
|
132 | |||
133 | /** |
||
134 | * @return Dictionary |
||
135 | */ |
||
136 | 18 | public function getDictionary(): Dictionary |
|
144 | |||
145 | /** |
||
146 | * @param Dictionary $dictionary |
||
147 | */ |
||
148 | 18 | public function setDictionary(Dictionary $dictionary) |
|
152 | |||
153 | /** |
||
154 | * @return ApiClient |
||
155 | */ |
||
156 | 11 | public function getApiClient(): ApiClient |
|
164 | |||
165 | /** |
||
166 | * @param ApiClient $apiClient |
||
167 | */ |
||
168 | 14 | public function setApiClient(ApiClient $apiClient) |
|
172 | |||
173 | /** |
||
174 | * @throws \Exception |
||
175 | * |
||
176 | * @return array|bool |
||
177 | */ |
||
178 | 11 | public function getSlackUserInfo() |
|
203 | |||
204 | /** |
||
205 | * @return ClassUtility |
||
206 | */ |
||
207 | 18 | public function getClassUtility(): ClassUtility |
|
215 | |||
216 | /** |
||
217 | * @param ClassUtility $classUtility |
||
218 | */ |
||
219 | 18 | public function setClassUtility(ClassUtility $classUtility) |
|
223 | } |
||
224 |