1 | <?php |
||
8 | class SocialProvidersLoader |
||
9 | { |
||
10 | /** |
||
11 | * @var Repository |
||
12 | */ |
||
13 | protected $cache; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $cacheKey = 'mad-web.social-providers'; |
||
19 | |||
20 | /** |
||
21 | * @var Dispatcher |
||
22 | */ |
||
23 | protected $dispatcher; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $social_model; |
||
29 | |||
30 | /** |
||
31 | * SocialProvidersLoader constructor. |
||
32 | * @param Repository $cache |
||
33 | * @param Dispatcher $dispatcher |
||
34 | */ |
||
35 | 57 | public function __construct(Repository $cache, Dispatcher $dispatcher) |
|
42 | |||
43 | /** |
||
44 | * Get available social providers. |
||
45 | * |
||
46 | * @return \Illuminate\Database\Eloquent\Collection |
||
47 | */ |
||
48 | public function getSocialProviders() |
||
56 | |||
57 | /** |
||
58 | * Forget cached social providers. |
||
59 | */ |
||
60 | 57 | public function forgetSocialProviders() |
|
64 | |||
65 | /** |
||
66 | * Register additional social providers. |
||
67 | */ |
||
68 | 57 | public function registerSocialProviders() |
|
79 | |||
80 | /** |
||
81 | * Remove cache data on social providers table update. |
||
82 | */ |
||
83 | 57 | protected function registerCacheRefresher() |
|
95 | } |
||
96 |