Link Details

Link 95050 thumbnail
User 225135 avatar

By skoop
via phpimpact.wordpress.com
Published: Jul 15 2008 / 12:08

Zend_Controller_Router_Rewrite is the standard framework router. It takes a URI endpoint and decomposes it into parameters to determine which module, controller, and action of that controller should receive the request. Routing occurs only once, when the request is initially received and before the first controller is dispatched.
  • 12
  • 2
  • 790
  • 160

Comments

Add your comment
User 281687 avatar

paul_houle replied ago:

0 votes Vote down Vote up Reply

I think he might be a little too obsessed with performance here. He's introducing a router that goes in front of the Zend router that cuts down on the number of regexes that need to be processed. He might consider developing a special purpose router optimized to his task.

User 287383 avatar

phpimpact replied ago:

0 votes Vote down Vote up Reply

Well, if you can improve the performance or your application, why not do it? I'm not introducing anything or creating my own router, I'm just extending the standard router and using a well known technique to improve the performance of the framework.

User 292525 avatar

scriptone replied ago:

0 votes Vote down Vote up Reply

Great tip thanks, regular expressions can be slow in PHP.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.