On 6/17/05, Bob Zoller <[EMAIL PROTECTED]> wrote: > 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.
Right, the benefit being that you have control over when to execute that behavior. I think I prefer to leave it this way, at least for now. > 2. passing args to Model (again, maybe others?) initialize() (or > __construct()) methods. Right, I ran into the same thing when I needed to pass the testcase into a mock object I was trying to pull out of a factory. I started to go ahead and refactor all the instantiating methods to accept an optional parameter to pass to the object's constructor but wanted to do it as a seperate refactoring. I've a couple things left I want to get done to finalize http://trac.agavi.org/trac.cgi/ticket/32, I'd planned on cleaning up the factory methods next. -Mike _______________________________________________ agavi-dev mailing list [email protected] http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
