1 | <?php |
||
9 | class HashidManager extends Manager |
||
10 | { |
||
11 | /** |
||
12 | * Get a hashid connection instance. |
||
13 | * |
||
14 | * @param string|null $name |
||
15 | * @return mixed |
||
16 | */ |
||
17 | 12 | public function connection($name = null) |
|
21 | |||
22 | /** |
||
23 | * Get all of the created connections. |
||
24 | * |
||
25 | * @return array |
||
26 | */ |
||
27 | 1 | public function getConnections() |
|
31 | |||
32 | /** |
||
33 | * Get the default connection name. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 3 | public function getDefaultConnection() |
|
41 | |||
42 | /** |
||
43 | * Set the default connection name. |
||
44 | * |
||
45 | * @param string $name |
||
46 | * @return $this |
||
47 | */ |
||
48 | 1 | public function setDefaultConnection($name) |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 1 | public function getDefaultDriver() |
|
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 12 | protected function createDriver($name) |
|
73 | |||
74 | /** |
||
75 | * Create a new driver instance for the given connection. |
||
76 | * |
||
77 | * @param string $name |
||
78 | * @param array $config |
||
79 | * @return mixed |
||
80 | */ |
||
81 | 12 | protected function createForConnection($name, array $config = []) |
|
87 | |||
88 | /** |
||
89 | * Create a new driver instance for the given driver. |
||
90 | * |
||
91 | * We will check to see if a creator method exists for the given driver, |
||
92 | * and will call the Closure if so, which allows us to have a more generic |
||
93 | * resolver for the drivers themselves which applies to all connections. |
||
94 | * |
||
95 | * @param string $driver |
||
96 | * @param array $config |
||
97 | * @return mixed |
||
98 | * |
||
99 | * @throws \InvalidArgumentException |
||
100 | */ |
||
101 | 6 | protected function createForDriver($driver, array $config = []) |
|
113 | |||
114 | /** |
||
115 | * Call a custom creator. |
||
116 | * |
||
117 | * @param string $key |
||
118 | * @param array $parameters |
||
119 | * @return mixed |
||
120 | */ |
||
121 | 7 | protected function callCustom($key, array $parameters = []) |
|
125 | |||
126 | /** |
||
127 | * Get the binding key for the driver. |
||
128 | * |
||
129 | * @param string $driver |
||
130 | * @return string|null |
||
131 | */ |
||
132 | 5 | protected function getBindingKeyForDriver($driver) |
|
140 | |||
141 | /** |
||
142 | * Resolve the given binding from the container. |
||
143 | * |
||
144 | * NOTE: |
||
145 | * `Container::make($abstract, $parameters)` which can pass additional |
||
146 | * parameters to the constructor was removed in Laravel 5.4 |
||
147 | * (https://github.com/laravel/internals/issues/391), but then re-added |
||
148 | * as `makeWith()` in v5.4.16 (https://github.com/laravel/framework/pull/18271). |
||
149 | * And in L55 the `makeWith()` is just an alias to `make()`. |
||
150 | * |
||
151 | * @param string $key |
||
152 | * @param array $parameters |
||
153 | * @return mixed |
||
154 | */ |
||
155 | 4 | protected function resolveBinding($key, array $parameters = []) |
|
165 | } |
||
166 |