2008年12月17日星期三

[fw-mvc] MVC and good practices, how and where filters gpc ?

Hi all,

I'm new on this list, and nearly a novice with Zend Framework (even if I
used successfuly it on some projects, since the 1.0).

I usualy work on mutual server, or on projects where I can't modify PHP
configuration, and I must often do with the Magicquotes GPC. My question
is quite simple: How and where I would filter every GET POST and COOKIES
entries with stripslashes ? Using an array_map callback for "stripslash
deeply" data at top of my bootstrap seems to be really... Disgraceful.

I have the same question with, for example, auto "utf8_decode" params in
case of AJAX Request. I heard about "context" in controllers, maybe it
can help me ? Or it's better to do it in an Initializer plugin of my
front controller ?

Like some camels said, TIMTOWTDI... But all ways aren't as good and
graceful as the others, and I want to use Zend Framework the right
way... If there's a right way.

Thanks,
Lucas

没有评论: