@@ 243-255 (lines=13) @@ | ||
240 | if (array_key_exists('options', $arguments)) { |
|
241 | foreach ($arguments['options'] as $option => $value) { |
|
242 | switch ($option) { |
|
243 | case 'default_host': |
|
244 | $uriService = $serviceId.'.default_host_uri'; |
|
245 | $addHostPlugin = $serviceId.'.default_host_plugin'; |
|
246 | $this->createUri($container, $uriService, $value); |
|
247 | $container |
|
248 | ->register($addHostPlugin, AddHostPlugin::class) |
|
249 | ->setPublic(false) |
|
250 | ->addArgument(new Reference($uriService)) |
|
251 | ; |
|
252 | if (!in_array($addHostPlugin, $plugins)) { |
|
253 | $plugins[] = $addHostPlugin; |
|
254 | } |
|
255 | break; |
|
256 | case 'force_host': |
|
257 | $uriService = $serviceId.'.force_host_uri'; |
|
258 | $addHostPlugin = $serviceId.'.force_host_plugin'; |
|
@@ 256-269 (lines=14) @@ | ||
253 | $plugins[] = $addHostPlugin; |
|
254 | } |
|
255 | break; |
|
256 | case 'force_host': |
|
257 | $uriService = $serviceId.'.force_host_uri'; |
|
258 | $addHostPlugin = $serviceId.'.force_host_plugin'; |
|
259 | $this->createUri($container, $uriService, $value); |
|
260 | $container |
|
261 | ->register($addHostPlugin, AddHostPlugin::class) |
|
262 | ->setPublic(false) |
|
263 | ->addArgument(new Reference($uriService)) |
|
264 | ->addArgument(['replace' => true]) |
|
265 | ; |
|
266 | if (!in_array($addHostPlugin, $plugins)) { |
|
267 | $plugins[] = $addHostPlugin; |
|
268 | } |
|
269 | break; |
|
270 | } |
|
271 | } |
|
272 | } |