Skip to content

Commit 1a3f16a

Browse files
author
Dominik Liebler
committed
README for Builder
1 parent 2403083 commit 1a3f16a

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

Builder/BuilderInterface.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,7 @@
33
namespace DesignPatterns\Builder;
44

55
/**
6-
* Builder is an interface that build parts of a complex object.
7-
*
8-
* Sometime, if the builder has a better knowledge of what it builds, this
9-
* interface could be an abstract class with default methods (aka adapter)
10-
*
11-
* If you have a complex inheritance tree for vehicles, it is logical to have
12-
* a complex inheritance tree for builders too.
13-
*
14-
* Note: Builders have often a fluent interface, see the mock builder of
15-
* PHPUnit for example.
6+
*
167
*/
178
interface BuilderInterface
189
{

Builder/Parts/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
3+
# Purpose
4+
5+
6+
7+
# Examples
8+
9+
*
10+

Builder/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Builder
2+
3+
## Purpose
4+
5+
Builder is an interface that build parts of a complex object.
6+
7+
Sometimes, if the builder has a better knowledge of what it builds, this interface could be an abstract class with default methods (aka adapter).
8+
9+
If you have a complex inheritance tree for objects, it is logical to have a complex inheritance tree for builders too.
10+
11+
Note: Builders have often a fluent interface, see the mock builder of PHPUnit for example.
12+
13+
## Examples
14+
15+
* PHPUnit: Mock Builder

0 commit comments

Comments
 (0)