1 | <?php |
||
10 | class Manager |
||
11 | { |
||
12 | /** |
||
13 | * @var \Illuminate\Support\Collection |
||
14 | */ |
||
15 | protected $services; |
||
16 | |||
17 | /** |
||
18 | * Manager constructor. |
||
19 | */ |
||
20 | public function __construct() |
||
26 | |||
27 | /** |
||
28 | * Registers the enabled services |
||
29 | */ |
||
30 | protected function load() |
||
36 | |||
37 | /** |
||
38 | * @param string $service |
||
39 | * |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function has(string $service) |
||
46 | |||
47 | /** |
||
48 | * @param string $service |
||
49 | * |
||
50 | * @return \Clarkeash\Shield\Contracts\Service | null |
||
51 | */ |
||
52 | public function get(string $service) |
||
56 | |||
57 | /** |
||
58 | * @param string $service |
||
59 | * @param \Clarkeash\Shield\Contracts\Service $instance |
||
60 | */ |
||
61 | public function put(string $service, Service $instance) |
||
65 | |||
66 | /** |
||
67 | * @param string $service |
||
68 | * @param \Illuminate\Http\Request $request |
||
69 | * |
||
70 | * @return boolean |
||
71 | */ |
||
72 | public function passes(string $service, Request $request): bool |
||
82 | |||
83 | public function checkHeaders(array $headers, Request $request) |
||
91 | |||
92 | /** |
||
93 | * @param string $service |
||
94 | * @param $instance |
||
95 | * |
||
96 | * @throws \Clarkeash\Shield\Exceptions\UnknownServiceException |
||
97 | */ |
||
98 | public function register(string $service, $instance) |
||
114 | } |
||
115 |