| 1 | <?php |
||
| 10 | class PizzaBuilder |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var bool |
||
| 14 | */ |
||
| 15 | public $peperoni = false; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var bool |
||
| 19 | */ |
||
| 20 | public $tomato = false; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var bool |
||
| 24 | */ |
||
| 25 | public $anchovy = false; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var bool |
||
| 29 | */ |
||
| 30 | public $mozzarella = false; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var bool |
||
| 34 | */ |
||
| 35 | public $salami = false; |
||
| 36 | |||
| 37 | |||
| 38 | /** |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | 1 | public function addPeperoni() |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @return $this |
||
| 49 | */ |
||
| 50 | public function addTomato() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return $this |
||
| 58 | */ |
||
| 59 | 1 | public function addAnchovy() |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return $this |
||
| 67 | */ |
||
| 68 | public function addMozzarella() |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return $this |
||
| 76 | */ |
||
| 77 | public function addSalami() |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return Pizza |
||
| 85 | */ |
||
| 86 | 1 | public function build() |
|
| 90 | } |
||
| 91 |