1 | <?php |
||
9 | class EarlyAccess |
||
10 | { |
||
11 | use InteractsWithTime; |
||
12 | |||
13 | /** |
||
14 | * @var \Illuminate\Contracts\Filesystem\Filesystem |
||
15 | */ |
||
16 | private $storage; |
||
17 | /** |
||
18 | * @var \Illuminate\Contracts\Auth\Guard |
||
19 | */ |
||
20 | private $auth; |
||
21 | |||
22 | /** |
||
23 | * EarlyAccess constructor. |
||
24 | * |
||
25 | * @param \Illuminate\Contracts\Filesystem\Filesystem $storage |
||
26 | * @param \Illuminate\Contracts\Auth\Guard $auth |
||
27 | */ |
||
28 | public function __construct(Storage $storage, Auth $auth) |
||
34 | |||
35 | /** |
||
36 | * Checks if early access is enabled or not. |
||
37 | * |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function isEnabled(): bool |
||
48 | |||
49 | /** |
||
50 | * Returns a list of allowed networks. |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | public function allowedNetworks(): array |
||
60 | |||
61 | /** |
||
62 | * Adds a network to the list of allowed networks. |
||
63 | * |
||
64 | * @param array $networks |
||
65 | */ |
||
66 | public function addAllowedNetworksToBeacon(array $networks) |
||
78 | |||
79 | /** |
||
80 | * Save the beacon file. |
||
81 | * |
||
82 | * @param array $allowed |
||
83 | * @return bool |
||
84 | */ |
||
85 | public function saveBeacon(array $allowed = []): bool |
||
96 | |||
97 | /** |
||
98 | * Deletes the beacon file. |
||
99 | * |
||
100 | * @return bool |
||
101 | */ |
||
102 | public function deleteBeacon(): bool |
||
106 | |||
107 | /** |
||
108 | * Get the beacon file details. |
||
109 | * |
||
110 | * @return false|array |
||
111 | */ |
||
112 | public function getBeaconDetails() |
||
120 | |||
121 | /** |
||
122 | * Saves the beacon file. |
||
123 | * |
||
124 | * @param array $data |
||
125 | * @return bool |
||
126 | */ |
||
127 | private function saveBeaconFileWithData(array $data): bool |
||
131 | } |
||
132 |