Forums / Developer / Request filter, filter chain or comparable solution

Request filter, filter chain or comparable solution

Author Message

Tobias Vogel

Tuesday 01 July 2008 8:48:02 am

Hello,

a concept which i know from the PHP Application Framework Symfony, or from J2EE web solutions, is the introduction of request filtering and a filter chain. Basically, these are classes with a function, that gets called on every request and gets handed over request parameters. A short description on how this might work can be found here (symfony docs):

http://www.symfony-project.org/book/1_0/06-Inside-the-Controller-Layer#Filters

Besides security measures, this can be very useful to dynamically insert code into the pagelyout (Google Analytics and others come to mind). With this method, one can keep the pagelyout and/or templates very clean and put the logic into a filter class and easily reuse it.

Is there something comparable, when developing with eZ Publish or is someone aware of an alternative solution?