@@ 52-64 (lines=13) @@ | ||
49 | $this->addPasswordParameter($container, $config); |
|
50 | } |
|
51 | ||
52 | private function addHostParameter(ContainerBuilder $container, array $config) |
|
53 | { |
|
54 | $searchHost = $container->hasParameter('kunstmaan_search.hostname') ? $container->getParameter('kunstmaan_search.hostname') : 'localhost'; |
|
55 | if (null === $config['connection']['host'] && $searchHost !== 'localhost') { |
|
56 | @trigger_error('Not providing a value for the "kunstmaan_search.connection.host" config while setting the "kunstmaan_search.hostname" parameter is deprecated since KunstmaanDashboardBundle 5.2, this config value will replace the "kunstmaan_search.hostname" parameter in KunstmaanDashboardBundle 6.0.', E_USER_DEPRECATED); |
|
57 | } |
|
58 | ||
59 | if (null !== $config['connection']['host']) { |
|
60 | $searchHost = $config['connection']['host']; |
|
61 | } |
|
62 | ||
63 | $container->setParameter('kunstmaan_search.hostname', $searchHost); |
|
64 | } |
|
65 | ||
66 | private function addPortParameter(ContainerBuilder $container, array $config) |
|
67 | { |
|
@@ 66-78 (lines=13) @@ | ||
63 | $container->setParameter('kunstmaan_search.hostname', $searchHost); |
|
64 | } |
|
65 | ||
66 | private function addPortParameter(ContainerBuilder $container, array $config) |
|
67 | { |
|
68 | $searchPort = $container->hasParameter('kunstmaan_search.port') ? $container->getParameter('kunstmaan_search.port') : 9200; |
|
69 | if (null === $config['connection']['port'] && $searchPort !== 9200) { |
|
70 | @trigger_error('Not providing a value for the "kunstmaan_search.connection.port" config while setting the "kunstmaan_search.port" parameter is deprecated since KunstmaanDashboardBundle 5.2, this config value will replace the "kunstmaan_search.port" parameter in KunstmaanDashboardBundle 6.0.', E_USER_DEPRECATED); |
|
71 | } |
|
72 | ||
73 | if (null !== $config['connection']['port']) { |
|
74 | $searchPort = $config['connection']['port']; |
|
75 | } |
|
76 | ||
77 | $container->setParameter('kunstmaan_search.port', $searchPort); |
|
78 | } |
|
79 | ||
80 | private function addUserParameter(ContainerBuilder $container, array $config) |
|
81 | { |