[dev] Injector musings
Chuck Hagenbuch
chuck at horde.org
Mon Aug 30 01:37:06 UTC 2010
Quoting Gunnar Wrobel <p at rdus.de>:
> Concerning the Horde_Editor factory: The only thing I'd tend to
> change would be to modify the binder so that it is bound to
> 'Horde_Editor_Factory' (as it does not directly deliver a
> 'Horde_Editor' object). You could create a Horde_Editor_Factory
> class in the Horde_Editor package though that might make things more
> complicated as this probably should not have knowledge of
> Horde_Browser and the Horde configuration (which
> Horde_Core_Factory_Editor currently has). Maybe Horde_Editor_Factory
> should just be an interface that is being implemented by
> Horde_Core_Factory_Editor.
I wanted to second this point. There are a number of injector bindings
right now which give you back a factory when you haven't actually
asked for it - asking for a Horde_Editor object should give you a
Horde_Editor object (or an error), not a factory. If we need a factory
we should be asking for it.
So this is currently on my list to clean up, but I would love it if
someone beat me to it.
-chuck
More information about the dev
mailing list