Previously, we all discussed the use of factory patterns in the ZF, and
some of the complications that arise. Ideally, we should be able to
directly instantiate adapter/plugin instances or use a factory method
with IDEs helping complete code and catch our spelling errors for both
of these use cases.
It looks to me like if we want to use some advanced things (like
factories and/or variable args) then IDEs couldn't help us much without
extending phpdoc formats to allow for such things. Even then if we want
to do things like factories having different args depending on plugins
we'd probably not get IDEs display the args as well as they do in case
of plain function call - they just can't be that smart. IDE-wise, of
course, directly instantiating the end class is the best method.
However, in places like DB it might be not always best user-wise...
- Re: [fw-general] ZF Coding Standard: Factories - code... Stanislav Malyshev
-