title: ZF2: Get url parameters in controller
body: <p>I have experienced Zend Framework 1 and I've build some apps with that framework.</p>
  
  <p>Now, I'm experimenting Zend Framework 2, but I'm stuck on the url parameters.
  I've setup my routing like this:</p>
  
  <pre><code>// Setup for router and routes
  'Zend\Mvc\Router\RouteStack' =&gt; array(
      'parameters' =&gt; array(
          'routes' =&gt; array(
              'default' =&gt; array(
                  'type'    =&gt; 'Zend\Mvc\Router\Http\Segment',
                  'options' =&gt; array(
                      'route'    =&gt; '/[:slug]',
                      'constraints' =&gt; array(
                      'slug' =&gt; '[a-zA-Z][a-zA-Z0-9_\/-]*'
                      ),
                  'defaults' =&gt; array(
                      'controller' =&gt; 'Htmlsite\Controller\BootController',
                      'action'     =&gt; 'index',
                      'slug' =&gt; 'home'
                      ),
                  ),
              ),
          'home' =&gt; array(
              'type' =&gt; 'Zend\Mvc\Router\Http\Literal',
              'options' =&gt; array(
                  'route'    =&gt; '/',
                  'defaults' =&gt; array(
                      'controller' =&gt; 'Htmlsite\Controller\BootController',
                      'action'     =&gt; 'index',
                      ),
                  ),
              ),
          ),
      ),
  ),
  </code></pre>
  
  <p>As you can see, I've tried to make a variable slug.
  How can I access this variable?</p>