Development

Upgrade1.1-RoutingModule (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of Upgrade1.1-RoutingModule

Show
Ignore:
Author:
GaryFx (IP: 71.232.85.188)
Timestamp:
08/14/08 02:09:26 (9 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Upgrade1.1-RoutingModule

    v0 v1  
     1In symfony 1.1, routing is implemented via a factory.  The default routing module is {{{sfPatternRouting}}}, and can be set and configured in the {{{factories.yml}}} file.  Specific routing rules are still configured in `routing.yml`. 
     2 
     3The `sf_suffix`, `sf_default_module`, and `sf_default_action` settings are not 
     4used anymore. To change the default suffix, module, or action, you now have 
     5to edit `factories.yml` instead of `settings.yml`, and change the parameters 
     6of the `routing` factory: 
     7{{{ 
     8[yml] 
     9all: 
     10  routing: 
     11    class: sfPatternRouting 
     12    param: 
     13      load_configuration: true 
     14      suffix:             .       # Default suffix for generated URLs. If set to a single  
     15                                  # dot (.), no suffix is added. Possible values: .html, .php, and so on. 
     16      default_module:     default # Default module and action to be called when 
     17      default_action:     index   # a routing rule doesn't set it 
     18}}} 
     19 
     20To inject default route parameters, you can now use the `->setDefaultParameter()` 
     21method instead of using the `sf_routing_defaults` setting: 
     22{{{ 
     23[php] 
     24$this->context->getRouting()->setDefaultParameter($key, $value); 
     25}}}