From d05a8beb9c436d5f2946c6c920267cad06d2b5aa Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Tue, 24 Sep 2013 14:08:25 +0200 Subject: [PATCH] README SimpleFactory --- SimpleFactory/ConcreteFactory.php | 8 +------- SimpleFactory/README.md | 9 +++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 SimpleFactory/README.md diff --git a/SimpleFactory/ConcreteFactory.php b/SimpleFactory/ConcreteFactory.php index 2890da6..fba685f 100644 --- a/SimpleFactory/ConcreteFactory.php +++ b/SimpleFactory/ConcreteFactory.php @@ -3,13 +3,7 @@ namespace DesignPatterns\SimpleFactory; /** - * 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. + * class ConcreteFactory */ class ConcreteFactory { diff --git a/SimpleFactory/README.md b/SimpleFactory/README.md new file mode 100644 index 0000000..5bb2af6 --- /dev/null +++ b/SimpleFactory/README.md @@ -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.