[dev] (sesha) Horde_Forms and data sources
Michael J Rubinsky
mrubinsk at horde.org
Fri Jan 13 18:00:04 UTC 2012
Quoting Ralf Lang <lang at b1-systems.de>:
> Currently in converting sesha, several Horde_Form descendants create
> a sesha_driver in their constructor.
Generally, you would want to create a factory for the driver and use
the $injector to obtain an instance of it.
> I'd rather move constructing the driver somewhere out of the form
> constructor.
>
> Is it valid to pass the sesha_driver or the relevant data in the
> constructor, changing the signature of Sesha_Forms_*::__construct to
> be different from Horde_Forms::__construct ?
If it's not posisble to use a factory and the injector for some
reason, then it shouldn't be a problem to inject the driver into the
Sesha_Form's constructor.
--
mike
The Horde Project (www.horde.org)
mrubinsk at horde.org
More information about the dev
mailing list