Skip to content

Files

Latest commit

author
Dominik Liebler
Sep 24, 2013
d05a8be · Sep 24, 2013

History

History
This branch is 1031 commits behind DesignPatternsPHP/DesignPatternsPHP:main.

SimpleFactory

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 haZ multiple factories, differently parametrized, you can subclass it and you can mock-up it.