mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-20 21:42:20 +02:00
start a restructure
This commit is contained in:
11
Creational/Builder/Parts/Bike.php
Normal file
11
Creational/Builder/Parts/Bike.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Builder\Parts;
|
||||
|
||||
/**
|
||||
* Bike is a bike
|
||||
*/
|
||||
class Bike extends Vehicle
|
||||
{
|
||||
|
||||
}
|
11
Creational/Builder/Parts/Car.php
Normal file
11
Creational/Builder/Parts/Car.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Builder\Parts;
|
||||
|
||||
/**
|
||||
* Car is a car
|
||||
*/
|
||||
class Car extends Vehicle
|
||||
{
|
||||
|
||||
}
|
11
Creational/Builder/Parts/Door.php
Normal file
11
Creational/Builder/Parts/Door.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Builder\Parts;
|
||||
|
||||
/**
|
||||
* Class Door
|
||||
*/
|
||||
class Door
|
||||
{
|
||||
|
||||
}
|
11
Creational/Builder/Parts/Engine.php
Normal file
11
Creational/Builder/Parts/Engine.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Builder\Parts;
|
||||
|
||||
/**
|
||||
* Class Engine
|
||||
*/
|
||||
class Engine
|
||||
{
|
||||
|
||||
}
|
10
Creational/Builder/Parts/README.md
Normal file
10
Creational/Builder/Parts/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
|
||||
# Purpose
|
||||
|
||||
|
||||
|
||||
# Examples
|
||||
|
||||
*
|
||||
|
23
Creational/Builder/Parts/Vehicle.php
Normal file
23
Creational/Builder/Parts/Vehicle.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Builder\Parts;
|
||||
|
||||
/**
|
||||
* VehicleInterface is a contract for a vehicle
|
||||
*/
|
||||
abstract class Vehicle
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $data;
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function setPart($key, $value)
|
||||
{
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
}
|
11
Creational/Builder/Parts/Wheel.php
Normal file
11
Creational/Builder/Parts/Wheel.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Builder\Parts;
|
||||
|
||||
/**
|
||||
* Class Wheel
|
||||
*/
|
||||
class Wheel
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user