mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
32 lines
468 B
PHP
32 lines
468 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\FactoryMethod;
|
|
|
|
/**
|
|
* Porsche is a german car
|
|
*/
|
|
class Porsche implements Vehicle
|
|
{
|
|
/**
|
|
* @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()
|
|
{
|
|
|
|
}
|
|
}
|