title: Decorate or extend HTTP request class in Silex
body: <p>In example, I want to add additional methods to Request class, like <code>getRequiered*($name)</code> which will throw exception in case of missed param in request. I'd like to implement it like this:</p>
  
  <pre><code>class MySmartRequest extends Request {
      // ...
      function getIntRequired($name) {
          $res = $this-&gt;get($name, null);
          if (null === $res) { throw new Exception('Missed required param'); }
          return (int) $res;
      }
  }
  
  // ...
  
  $app-&gt;before(function(Request $r) {
      return new MySmartRequest($r);
  });
  </code></pre>
  
  <p>Is it possilbe? </p>