title: Yii2 - Capture paramether from router in beforeAction
body: <p>Is there a way to capture parameter from router in the beforeAction, so it could be use by all functions in controller?</p>
  
  <p>I have this router:</p>
  
  <pre><code>'http://&lt;user:\w+&gt;.' . $domain . '/&lt;controller:\w+&gt;/&lt;action:\w+&gt;' =&gt; '&lt;controller&gt;/&lt;action&gt;',
  </code></pre>
  
  <p>I want to use <strong></strong> as ID in all functions in controller, and make it available without injecting it into the function? Is this possible?</p>