mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-06 15:06:31 +02:00
merge from master
This commit is contained in:
22
Structural/Bridge/Car.php
Normal file
22
Structural/Bridge/Car.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Structural\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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user