So this message has two purposes: 1. to discuss initialize() vs. __construct(), at least as it relates to Models.. possibly other places.
Currently, Agavi uses the initialize() method (basically) instead of relying on the __construct() method. Is this necessary, or might we simplify things a bit by using the builtin __construct method? I realize this would be our first major BREAK in compatibility with Mojavi. 2. passing args to Model (again, maybe others?) initialize() (or __construct()) methods. This came up in the forums and I thought it was interesting, really just because of the ability to re-use existing classes that might require params in their constructors as Models. Now of course, if I'm able to edit the class to extend Model, I can probably just refactor it to not require params to the constructor.. but it was a thought and I figured I'd mention it to the list. I guess this would involve modifying Controller's getModel/getGlobalModel to allow for passing (an array?) of parameters that would then get passed to the Model's constructor/initialize method. Food for thought.. --Bob _______________________________________________ agavi-dev mailing list [email protected] http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
