README for Builder

This commit is contained in:
Dominik Liebler
2013-09-24 13:20:07 +02:00
parent 2403083d61
commit 1a3f16ab29
3 changed files with 26 additions and 10 deletions

View File

@@ -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
{

10
Builder/Parts/README.md Normal file
View File

@@ -0,0 +1,10 @@
#
# Purpose
# Examples
*

15
Builder/README.md Normal file
View File

@@ -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