Implemented Bridge Pattern

This commit is contained in:
Ulbrec
2014-04-12 13:23:00 +02:00
parent 978825cb28
commit feaa8daafb
8 changed files with 130 additions and 0 deletions

20
Bridge/Car.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
namespace DesignPatterns\Bridge;
/**
* Refined Abstraction
*/
class Car extends Vehicle {
public function __construct(Workshop $workShop1, Workshop $workShop2) {
parent::__construct($workShop1, $workShop2);
}
public function manufacture() {
print 'Car ';
$this->workShop1->work();
$this->workShop2->work();
}
}