title: Accessing router in ViewHelper to match routes or child_routes
body: <p>I am encountering a problem for which i have no understanding of the function of the framework  currently. I want to set up a <code>ViewHelper</code> that returns an output depending on which site i am on. If i match two specific <code>routes</code> or <code>child_routes</code>, i want the ViewHelper to output a list of links depending on that route. If i'm not on those matched routes, i want to output nothing.</p>
  
  <p>Setting up a ViewHelper is pretty simply, right now my ViewHelper looks like this:</p>
  
  <pre><code>'factories' =&gt; array(
      'myViewHelper' =&gt; function($sm) {
          $service = $sm-&gt;getServiceLocator()-&gt;get('some-doctrine-entity');
          return new \Mynamespace\View\Helper\ViewHelper($service);
      }
  )
  </code></pre>
  
  <p>The output is a LIST of Links alike that</p>
  
  <pre><code>$this-&gt;url('someLink', array('id', $service-&gt;getId());
  </code></pre>
  
  <p>Now my problem is the <code>someLink</code> parts needs to be variable. It should be either <code>foo</code> or <code>bar</code>. Both <code>foo</code> and <code>bar</code> can have <code>child_routes</code> like <code>foo/index, foo/details, foo/etc</code> and i need to match all of them.</p>
  
  <p>So my question is how to write this</p>
  
  <pre><code>$currentRoute = somehowGetTheCurrentRoute();
  if ($currentRoute matching `foo` or `foo/child_routes`
    or is matching `bar` or `bar/child_routes`) {
      echo "im happy";
  }
  </code></pre>