title: Behat+symfony2 access container parameters set in custom extension
body: <p>(I'm going to explain situation, incase someone knows of a better way to accomplice what I want to do).</p>
  
  <p>Using Symfony2 + Behat + Symfony2Extension + Mink + </p>
  
  <p>We have an application with multiple urls that will be visited during scenarios. </p>
  
  <p>I do understand that you use the parameters sent in from the FeatureContext __construct method, but what I'm trying to do is set up the urls in the behat.yml file so that we can use them in our custom Context to visit the urls.</p>
  
  <p>Looking at how the extensions work I have setup the dependency injection as follows:</p>
  
  <pre><code>class Extension implements ExtensionInterface
  {
  
      /**
       * Loads a specific configuration.
       *
       * @param array            $config    Extension configuration hash (from behat.yml)
       * @param ContainerBuilder $container ContainerBuilder instance
       */
      public function load(array $config, ContainerBuilder $container)
      {
          $container-&gt;setParameter('url_one', $config['url_one']);
          $container-&gt;setParameter('url_two', $config['url_two']);
  
      }
  
      /**
       * Setups configuration for current extension.
       *
       * @param ArrayNodeDefinition $builder
       */
      public function getConfig(ArrayNodeDefinition $builder)
      {
          $builder-&gt;
              children()-&gt;
                  scalarNode('one_url')-&gt;
                  isRequired()-&gt;
                  end()-&gt;
                  scalarNode('two_url')-&gt;
                  isRequired()-&gt;
                  end()-&gt;
              end();
      }  
   code continues....
  </code></pre>
  
  <p>And my behat.yml looks like this:</p>
  
  <pre><code>default:
      extensions:
          Behat\MinkExtension\Extension:
              goutte: ~
              selenium2: ~
          Behat\Symfony2Extension\Extension: ~
          Acme\AcmeExtension\Extension:
              url_one: 'http://example1.com'
              url_two: 'http:/example2.com'
  </code></pre>
  
  <p>Now in my FeatureContext.php class I would like to do the following:</p>
  
  <pre><code>        $url = $kernel-&gt;getContainer()-&gt;getParameter('url_one');
  </code></pre>
  
  <p>But this is not working, it is returning parameters from my Symfony2 application, which is expected since I have symfony2extension enabled. But I can not access the parameters or services from the extension class.</p>
  
  <p>(Please note that if I'm in the Extension class in the load method and I call the parameter I just set it returns it, so I know it is set, but it must be set to a different container?) </p>
  
  <p>First off is this possible? And if so what should I do to make it work.</p>
  
  <p>Many thanks for any help.</p>