[Solar-talk] Proposal: Remove namespace to Solar::loadClass()/factory()
Antti Holvikari
anttih at gmail.com
Tue Nov 7 07:55:34 PST 2006
On 11/7/06, Travis Swicegood <development at domain51.com> wrote:
> Howdy all,
>
> One thing in Solar that's been bugging me is the concrete class
> dependencies that it has. Code like this makes me cringe:
>
> $sql = Solar::factory('Solar_Sql');
>
> My whole problem with it is that it creates a dependency on Solar_Sql
> and keeps me to inserting my own Domain51_Sql code. My solution, as
> Paul has heard many (he would add "many, many" I believe) times is some
> sort of Dependency Injection model where you don't request the class,
> but it's interface.
Hi Travis!
Sorry if I have completely missed your point but doesn't
Solar::dependency() do the job?
--
Antti Holvikari <http://phphalo.com>
More information about the solar-talk
mailing list