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?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 17:58:09
Script start
Timing: Jan 18 2025 17:58:09
Module start 'layout'
Timing: Jan 18 2025 17:58:09
Module start 'content'
Timing: Jan 18 2025 17:58:09
Module end 'content'
Timing: Jan 18 2025 17:58:09
Script end

Main resources:

Total runtime0.0216 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.0469152.6406
Module start 'layout' 0.00760.0027 740.687539.4922
Module start 'content' 0.01030.0092 780.179785.1641
Module end 'content' 0.01950.0021 865.343830.3047
Script end 0.0216  895.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002712.5996140.0002
Check MTime0.00135.8811140.0001
Mysql Total
Database connection0.00094.350710.0009
Mysqli_queries0.003214.954230.0011
Looping result0.00000.143410.0000
Template Total0.00177.610.0017
Template load0.00094.249110.0009
Template processing0.00073.374210.0007
Override
Cache load0.00073.022210.0007
General
dbfile0.004319.920680.0005
String conversion0.00000.055240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs