> I do like this approach better. It sort of conflicts with another
> itch, but we can possibly iron out both itches in one shot. The other
> itch is not being able to pass parameters into models that have

Yeah I can implement that while I'm at it.


> functional constructors.  Would you be ok with the optional singleton
> parameter being 4th in the method signature?
> 
> Controller::getModel($module, $model, $args=null, $means=null)

I'm not sure if it belongs there. It somehow disrupts the logical order of
things. And it might also make sense to allow an unlimited amount of
parameters, what do you think? Using an optional array for $model to provide
model and getInstance would also imitate PHP's native behaviour, for example
in call_user_func():
http://www.php.net/manual/en/function.call-user-func.php

If we decide to implement parameter passing in
Controller::get(Global)Model(), we have to settle on how it would work, i.e:

a) pass an array and hand it to the constructor as an array
b) pass an array and hand it to the constructor as an unpacked sequence of
values
c) pass a sequence of values and hand them to the constructor

I'd favour the third one.

- David


_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to