title: Injecting Criteria into an sfPropelRoute object
body: <p>I have a <code>Page</code> object whose uniqueness comes from its <code>PageDomain</code>. The schema is configured such that the <code>page</code> table contains a <code>page_domain_id</code> field to create the relationship. To show a page, I have an <code>executeShow</code> action and a custom handler. My route looks like this:</p>
  
  <pre><code>page_show:
    url:     /:domain_slug/:slug
    class:   sfPropelRoute
    options:
      model: Page
      type:  object
      method_for_criteria: doSelectByDomain
  param:   { module: page, action: show }
  requirements:
    sf_method: [get]
  </code></pre>
  
  <p>By way of an example, I might have <code>/audience/create</code> and also <code>/behavior/create</code>. I need to be able to determine which page is being requested.</p>
  
  <p>The intent of the custom handler (<code>doSelectByDomain</code>) is to factor in the <code>domain_slug</code> and only retrieve/show a page if its domain is also correct. What I'm finding, though, is that even though a <code>domain_slug</code> parameter is available in the action's <code>$request</code> parameter, I have no way of getting it to my custom handler so that it can be factored into what's retrieved.</p>
  
  <p>I realize that I can access the <code>sfContext</code> object directly from my model, but that's inelegant at best and breaks MVC. I'm not afraid to use it if there's really no better way, but it seems like there must be. Symfony offers a <code>setListCriteria</code> method for list routes, but I can't find anything similar for object routes.</p>
  
  <p>Help? Thanks.</p>