1 | <?php namespace Arcanedev\LaravelSeo; |
||
12 | class RedirectorManager extends Manager implements RedirectorFactory |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Getters & Setters |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | /** |
||
19 | * Get the default driver name. |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | 27 | public function getDefaultDriver() |
|
27 | |||
28 | /** |
||
29 | * Get the config repository. |
||
30 | * |
||
31 | * @return \Illuminate\Contracts\Config\Repository |
||
32 | */ |
||
33 | 33 | protected function config() |
|
37 | |||
38 | /* ----------------------------------------------------------------- |
||
39 | | Main Methods |
||
40 | | ----------------------------------------------------------------- |
||
41 | */ |
||
42 | /** |
||
43 | * Get a driver instance. |
||
44 | * |
||
45 | * @param string $driver |
||
46 | * |
||
47 | * @return \Arcanedev\LaravelSeo\Contracts\Redirector |
||
48 | */ |
||
49 | 30 | public function driver($driver = null) |
|
53 | |||
54 | /** |
||
55 | * Build the config redirector driver. |
||
56 | * |
||
57 | * @return \Arcanedev\LaravelSeo\Redirectors\ConfigurationRedirector |
||
58 | */ |
||
59 | 27 | public function createConfigDriver() |
|
63 | |||
64 | /** |
||
65 | * Build the eloquent redirector driver. |
||
66 | * |
||
67 | * @return \Arcanedev\LaravelSeo\Redirectors\EloquentRedirector |
||
68 | */ |
||
69 | 3 | public function createEloquentDriver() |
|
75 | |||
76 | /* ----------------------------------------------------------------- |
||
77 | | Other Methods |
||
78 | | ----------------------------------------------------------------- |
||
79 | */ |
||
80 | /** |
||
81 | * Build the redirector. |
||
82 | * |
||
83 | * @param string $driver |
||
84 | * @param array $extra |
||
85 | * |
||
86 | * @return mixed |
||
87 | */ |
||
88 | 30 | private function buildDriver($driver, array $extra = []) |
|
96 | |||
97 | /** |
||
98 | * Get the seo config. |
||
99 | * |
||
100 | * @param string $key |
||
101 | * @param mixed|null $default |
||
102 | * |
||
103 | * @return mixed |
||
104 | */ |
||
105 | 33 | private function getConfig($key, $default = null) |
|
109 | } |
||
110 |