mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 04:30:16 +02:00
cs FactoryMethod
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\FactoryMethod;
|
||||
|
||||
/**
|
||||
@@ -11,10 +7,16 @@ namespace DesignPatterns\FactoryMethod;
|
||||
*/
|
||||
class Ferrari implements Vehicle
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $color;
|
||||
|
||||
/**
|
||||
* @param string $rgb
|
||||
*/
|
||||
public function setColor($rgb)
|
||||
{
|
||||
|
||||
$this->color = $rgb;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user