design patterns - Can factory methods return multiple instances? -


it factory method if returns instance of class factory method if returns multiple (an array of) instances?

if need return multiple instances, it, regardless of how called. indeed factory method, doesn't matter much.

perhaps can have factory method returning single instance, , 1 calls first 1 multiple times.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -