mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-12 01:44:09 +02:00
start a restructure
This commit is contained in:
31
Creational/FactoryMethod/Porsche.php
Normal file
31
Creational/FactoryMethod/Porsche.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\FactoryMethod;
|
||||
|
||||
/**
|
||||
* Porsche is a german car
|
||||
*/
|
||||
class Porsche implements VehicleInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $color;
|
||||
|
||||
/**
|
||||
* @param string $rgb
|
||||
*/
|
||||
public function setColor($rgb)
|
||||
{
|
||||
$this->color = $rgb;
|
||||
}
|
||||
|
||||
/**
|
||||
* although tuning by AMG is only offered for Mercedes Cars,
|
||||
* this is a valid coding example ...
|
||||
*/
|
||||
public function addTuningAMG()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user