Files
DesignPatternsPHP/Creational/SimpleFactory/README.md
2014-07-31 14:13:53 -05:00

356 B

Simple Factory

Purpose

ConcreteFactory is a simple factory pattern.

It differs from the static factory because it is NOT static and as you know: static => global => evil!

Therefore, you can have multiple factories, differently parametrized, you can subclass it and you can mock-up it.

UML Diagram

Alt SimpleFactory UML Diagram