PHP Symfony, fichier d’exemple routing.yml

routing.yml
ou ? apps/%app%/config/routing.yml

# default rules
homepage:
  url:   /
  param: { module: post, action: index }
 
post_show:
  url:   /blog/:slug.:sf_format
  class: sfDoctrineRoute
  param: { module: post, action: show, sf_format: html }
  options:
    generate_shortest_url: false
    type: object
    model: BlogPost
    column: slug
  requirements:
    sf_method: get
 
post_addComment:
  url: /comment/add
  class: sfRequestRoute
  param: { module: post, action: addComment }
  requirements:
    sf_method: post