title: How to access an application parameters from a service?
body: <p>From my controllers, I access the application parameters (those in <code>/app/config</code>) with</p>
  
  <pre><code>$this-&gt;container-&gt;getParameter('my_param')
  </code></pre>
  
  <p>But I don't know how to access it from a service (I imagine my service class is not supposed to extend <code>Symfony\Bundle\FrameworkBundle\Controller\Controller</code>).</p>
  
  <p>Should I map needed parameters into my service registration like this:</p>
  
  <pre><code>#src/Me/MyBundle/Service/my_service/service.yml
  parameters:
      my_param1: %my_param1%
      my_param2: %my_param2%
      my_param3: %my_param3%
  </code></pre>
  
  <p>or something similar? How should I access to my application parameters from a service?</p>
  
  <hr>
  
  <p><a href="https://stackoverflow.com/q/13901256/305189">This question</a> seems like the same but mine actually answers to it (parameters from a controller), I'm talking about accessing from a service.</p>