On 28/09/2006, at 11:52 AM, Christopher Thompson wrote:
I agree that the ZF would benefit by having the container type
objects share a common interface. Whether any of these classes
inherit a basic array/property class is a separate question that
should be made on a case by case basis. But having a common
interface standard would easy learning the ZF by making container
interfaces predictable.
Speaking only for myself, I'd be happy to build on a base abstract
class, but I agree that the 'Zend_Container' interface should be
formalised as well.
Regarding the FilterChain, I originally proposed the FilterChain
and Validator because I believe they are a better foundation on
which to build stuff than the monolithic and procedural Filter and
Filter_Input classes are. Because each Filter and Rule is its own
class it is both infinitely extensible, yet you only include what
you use. I actually originally created and implementation of the
Filter and Input_Filter classes that was built upon Filter and Rule
classes. It was very easy and would simplify testing and perhaps
performance.
Do you have a prototype for the FilterChain? I see the skeleton on
the proposal but was wondering how far progressed a proof-of-concept
class was. It's really for Ralf and I to evaluate to see how much
work would need to be done to plug it into our Form proposal.
As a sidenote, the FilterChain class could also be easily adapted
to optionally be used to implement Intercepting Filter containing
things like Access Control, Router and Front Controller objects. It
is very multi-purpose. The FilterChain is really just a chain that
you pass a Request object through and each Filter operates on the
Request. Likewise the Validator is a chain of Rules that check the
Request. These classes make it pretty easy to create Form and
Application Controllers.
Indeed, Darby had posted a quick heads-up on the Zend_Acl issues page
for an extension I'm investigating. Currently Zend_Acl performs a
very straightforward true/false test but another community member had
floated the idea for a filtered approach for individual (or even all)
ACOs for operations like IP filtering, time-of-day, etc. Using a
validator chain would be ideal, but again I was wondering if you had
anything concrete or whether your proposal would be better handled as
an interface so that each individual component could take care of the
nuts and bolts.
The proposal I did a while back and has never been updated and
needs a little work. I noticed that is has been demoted back to
proposed from under review.
Look forward to seeing your improvements when you get the time -
thanks for the quick response
--
Simon Mundy | Director | PEPTOLAB
""" " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
4124
http://www.peptolab.com