Intent
Separate the construction of a complex object from its representation so that the same construction process can create different representations.
将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示。
Code
Code can be found on Github
src/Creational/Builder/Director.php
1 |
|
src/Creational/Builder/BuilderInterface.php
1 |
|
src/Creational/Builder/CarBuilder.php
1 |
|
src/Creational/Builder/TruckBuilder.php
1 |
|
src/Creational/Builder/Parts/Vehicle.php
1 |
|
src/Creational/Builder/Parts/Car.php
1 |
|
src/Creational/Builder/Parts/Truck.php
1 |
|
src/Creational/Builder/Parts/Door.php
1 |
|
src/Creational/Builder/Parts/Engine.php
1 |
|
src/Creational/Builder/Parts/Wheel.php
1 |
|