1 | <?php |
||
6 | class DomainWhitelist extends ThreadSettings implements ActionTypeInterface |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $whitelistedDomains; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $actionType; |
||
18 | |||
19 | /** |
||
20 | * DomainWhitelist constructor. |
||
21 | * |
||
22 | * @param array $whitelistedDomains |
||
23 | * @param string $actionType |
||
24 | */ |
||
25 | public function __construct(array $whitelistedDomains, $actionType = ActionTypeInterface::ADD) |
||
36 | |||
37 | /** |
||
38 | * @param array $domains |
||
39 | */ |
||
40 | private function isValidDomains(array $domains) |
||
46 | |||
47 | /** |
||
48 | * @param $actionType |
||
49 | * @throws \InvalidArgumentException |
||
50 | */ |
||
51 | private function isValidActionType(string $actionType) |
||
58 | |||
59 | /** |
||
60 | * @return array |
||
61 | */ |
||
62 | private function getAllowedActionType(): array |
||
69 | |||
70 | /** |
||
71 | * @return array |
||
72 | */ |
||
73 | public function jsonSerialize(): array |
||
83 | } |
||
84 |