title: Yii2 route using yii\rest\UrlRule with several parameters
body: <p>I am trying to use Yii 2 routing for REST API. </p>
  
  <p>Following tutorial at <a href="http://www.yiiframework.com/doc-2.0/guide-rest-routing.html" rel="nofollow">http://www.yiiframework.com/doc-2.0/guide-rest-routing.html</a>, I have already defined (with success) a lot of rule for API entry point like so :</p>
  
  <pre><code>'urlManager' =&gt; [
      'enablePrettyUrl' =&gt; true,
      'enableStrictParsing' =&gt; true,
      'showScriptName' =&gt; false,
      'rules' =&gt; [
          [
              'class' =&gt; 'yii\rest\UrlRule', 
              'controller' =&gt; 'user'
          ],
      ],
  ]
  </code></pre>
  
  <p>Such a rule defines :</p>
  
  <ul>
  <li>GET /users (list users)</li>
  <li>GET /users/123 (show detail of user 123)</li>
  </ul>
  
  <p>Now, my users have games. So I'd like to have urls :</p>
  
  <ul>
  <li>GET /users/123/games (list games of user 123)</li>
  <li>GET /users/123/games/864 (details of game 864 for user 123 - such as his scores)</li>
  </ul>
  
  <p>I tried defining my new entry point (withhout success) like so:</p>
  
  <pre><code>'rules' =&gt; [
      ... previous rules ...,
      [
          'class' =&gt; 'yii\rest\UrlRule',
          'controller' =&gt; [
              'game'
          ],
          'tokens' =&gt; [
              '{userid}' =&gt; '&lt;userid:\\d&gt;',
              '{gameid}' =&gt; '&lt;gameid:\\d&gt;',
          ],
          'patterns' =&gt; [
              'GET,HEAD /users/{userid}/games' =&gt; 'index',
              'GET,HEAD /users/{userid}/games/{gameid}' =&gt; 'view',
          ]
      ]
  ]
  </code></pre>
  
  <p>This definition seems wrong because I get a 404 Page not found error.
  How should I define my new url routes ?
  I would like to use an equivalent format for my definitions, extending 'yii\rest\UrlRule'</p>
  
  <p>I am not sure if this is even possible, the tutorial not mentionning this case.</p>