[Solar-talk] Namespacing with concrete class functionality (was: Re: Proposal: Remove namespace to Solar::loadClass()/factory())
Travis Swicegood
development at domain51.com
Tue Nov 7 10:35:56 PST 2006
Howdy all,
Attached is a patch that updates loadClass() to allow a $concrete
parameter which would ignore namespacing all together. With this patch,
a Solar::loadClass('Solar_Sql', true) call works essentially as it did
prior to the original patch. This has several uses:
1. You want to override a class of the same name in a different vendor
namespace (i.e., Domain51_Sql extends Solar_Sql). It is required in
this instance.
2. You have specific functionality that is only available in one
particular class.
3. You know exactly what class you need to load and speed is of the
essence, in which case you don't want to waste resources on the
foreach() call.
I would interested to make sure this is working for everyone else's
applications. If you have the chance, please apply this patch, and
modify your config to look like:
$config['Solar']['namespace'] = array('Solar', 'Vendor');
Modifying "Vendor" to your vendor namespace. If running more than one
Vendor namespace, you'll also need to make sure they are specified here
as well.
-Travis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namespaceWithConcrete.patch
Type: text/x-patch
Size: 6330 bytes
Desc: not available
Url : http://mail.killersoft.com/pipermail/solar-talk/attachments/20061107/75c21b20/attachment-0001.bin
More information about the solar-talk
mailing list