forked from DesignPatternsPHP/DesignPatternsPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuilderInterface.php
43 lines (37 loc) · 889 Bytes
/
BuilderInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
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
{
/**
* @return mixed
*/
public function createVehicle();
/**
* @return mixed
*/
public function addWheel();
/**
* @return mixed
*/
public function addEngine();
/**
* @return mixed
*/
public function addDoors();
/**
* @return mixed
*/
public function getVehicle();
}