mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
README SimpleFactory
This commit is contained in:
@@ -3,13 +3,7 @@
|
|||||||
namespace DesignPatterns\SimpleFactory;
|
namespace DesignPatterns\SimpleFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ConcreteFactory is a simple factory pattern.
|
* class ConcreteFactory
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
class ConcreteFactory
|
class ConcreteFactory
|
||||||
{
|
{
|
||||||
|
9
SimpleFactory/README.md
Normal file
9
SimpleFactory/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# 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.
|
Reference in New Issue
Block a user