From 1a3f16ab297045737f9ffb5d41ebbd41ae4f0ed3 Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Tue, 24 Sep 2013 13:20:07 +0200 Subject: [PATCH] README for Builder --- Builder/BuilderInterface.php | 11 +---------- Builder/Parts/README.md | 10 ++++++++++ Builder/README.md | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 Builder/Parts/README.md create mode 100644 Builder/README.md diff --git a/Builder/BuilderInterface.php b/Builder/BuilderInterface.php index f52b56f..89b4b8f 100644 --- a/Builder/BuilderInterface.php +++ b/Builder/BuilderInterface.php @@ -3,16 +3,7 @@ namespace DesignPatterns\Builder; /** - * Builder is an interface that build parts of a complex object. - * - * Sometime, if the builder has a better knowledge of what it builds, this - * interface could be an abstract class with default methods (aka adapter) - * - * If you have a complex inheritance tree for vehicles, it is logical to have - * a complex inheritance tree for builders too. - * - * Note: Builders have often a fluent interface, see the mock builder of - * PHPUnit for example. + * */ interface BuilderInterface { diff --git a/Builder/Parts/README.md b/Builder/Parts/README.md new file mode 100644 index 0000000..9e802c8 --- /dev/null +++ b/Builder/Parts/README.md @@ -0,0 +1,10 @@ +# + +# Purpose + + + +# Examples + +* + diff --git a/Builder/README.md b/Builder/README.md new file mode 100644 index 0000000..3a85f51 --- /dev/null +++ b/Builder/README.md @@ -0,0 +1,15 @@ +# Builder + +## Purpose + +Builder is an interface that build parts of a complex object. + +Sometimes, if the builder has a better knowledge of what it builds, this interface could be an abstract class with default methods (aka adapter). + +If you have a complex inheritance tree for objects, it is logical to have a complex inheritance tree for builders too. + +Note: Builders have often a fluent interface, see the mock builder of PHPUnit for example. + +## Examples + +* PHPUnit: Mock Builder