title: What is the best way to get parameters from a route in zf2
body: <p>There are multiple ways to get parameters from a route in zf2.  A couple include</p>
  
  <pre><code>$pageID = (int)$this-&gt;getEvent()-&gt;getRouteMatch()-&gt;getParam('pageID');
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$pageID = (int) $this-&gt;params()-&gt;fromRoute('pageID', 0);
  </code></pre>
  
  <p>Which is the best, and why?</p>