M
M
magary42016-10-04 12:22:56
symfony
magary4, 2016-10-04 12:22:56

Loading configuration and set parameters?

i need to have access to only one configuration section in services
, this section is called conf_key and lies under someconfig

class myExtension extends Extension implements PrependExtensionInterface
{ 
   public function prepend(ContainerBuilder $container)
   {
      $container->setParameter("myParam4FutureInjection", $container->getExtensionConfig("someconfig")[1]["conf_key"]);
  }
}

but depending on how many configs are loaded, here $container->getExtensionConfig("someconfig") I get an array of configs, those are not yet merged, and it's not clear where exactly the conf_key key is located each time it can be different
how to do it in the mind ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question