[Solar-talk] Proposal: Remove namespace to Solar::loadClass()/factory()
Travis Swicegood
development at domain51.com
Tue Nov 7 09:49:20 PST 2006
Matt M. wrote:
>>
>> On 11/7/06, Travis Swicegood wrote:
>> > By specifying "true" as the second parameter, you could
>> override the
>> > namespace code. This would be necessary for sub-classes that
>> need to
>> > insure the specific super-class they expect is loaded.
>>
> Just so I understand... something like this? Just add the namespaces
> array to Solar config.
No - not quite. By calling Solar::loadClass('Solar_Sql', true) you
would be specifying that you don't want to look at namespaces at all,
whereas calling Solar::loadClass('Sql') would return the first
Vendor_Sql it could find (in the case of no known Vendor namespaces, it
would be Solar_Sql.
The idea came to me at the end of writing the original email out, so I
didn't have that fleshed out in the code. I'll work on that and post a
new patch as it will be absolutely necessary to provide a concrete
override - the obvious case being when I want my Domain51_Sql to extend
Solar_Sql - I can't ask for 'Sql' or I'll end up in an infinite loop.
-Travis
More information about the solar-talk
mailing list