[Solar-talk] Proposal: Remove namespace to Solar::loadClass()/factory()

Rodrigo Moraes rodrigo.moraes at gmail.com
Tue Nov 7 09:54:56 PST 2006


On 11/7/06, Travis Swicegood wrote:
> Just a quick - out of order response:
>
> > 3.Do the same in Solar::factory():
>
> If Solar::loadClass() is changed, Solar::factory() does not need to be
> changed as it relies on Solar::loadClass().

Indeed, but I think $class should be received by reference then:
loadClass(&$class)?

> The issue here again is that you have to configure that you want to
> change objects out.  What I am going for with the namespaces idea is
> that it makes Solar completely aware of all of the files in your Vendor
> namespace the way Solar_Controller_Front is aware of all of your
> Vendor_App files.  It's basically applying a very similar logic from
> S_C_Front to all requests to Solar::loadClass().

I understand (see my last e-mail).

> One thing you have to be careful with when you introduce new
> configuration options is how easily they can be managed.  If I wanted to
> write replacements for all of the Solar classes, my config file would
> become huge by maintaining a list of every class I want to override.

I am more favorable to namespaces, I just had that idea as an option
that requires less changes and (presumably) doesn't have a big
performance impact, in case the namespace idea has.

But I'm in favor of namespaces, or: I totally agree with its benefits. :-)

rodrigo

---------------------------------------------------------------------
Solar has now a Community Wiki: solarphp.org
---------------------------------------------------------------------
Join the #solarphp IRC channel on freenode.org
---------------------------------------------------------------------


More information about the solar-talk mailing list