On Fri, 26 Nov 2010 20:25:32 -0000, Peter Lind <peter.e.l...@gmail.com>
wrote:
It seems fairly handy and I've been in situations where I wanted to do
something like that - in fact, I use factories to achieve something
similar.
However, the more I use it, the more it feels like introducing code
smells into my code. You're essentially instantiating an object only
to immediately throw it away.
Not necessarily; you could be calling the method for the collateral
effects and that method return the object itself. This is not that
uncommon.
+1
--
Gustavo Lopes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php