mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-06 22:14:59 +02:00
21 lines
348 B
PHP
21 lines
348 B
PHP
<?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();
|
|
}
|
|
|
|
}
|