2013-05-10 21:09:55 +02:00
|
|
|
<?php
|
|
|
|
|
2014-04-15 22:59:59 -03:00
|
|
|
namespace DesignPatterns\Creational\FactoryMethod;
|
2013-05-10 21:09:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Bicycle is a bicycle
|
|
|
|
*/
|
2013-09-13 14:19:55 +02:00
|
|
|
class Bicycle implements VehicleInterface
|
2013-05-10 21:09:55 +02:00
|
|
|
{
|
2013-09-11 16:35:18 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $color;
|
2013-05-10 21:09:55 +02:00
|
|
|
|
2013-09-11 16:35:18 +02:00
|
|
|
/**
|
|
|
|
* sets the color of the bicycle
|
|
|
|
*
|
|
|
|
* @param string $rgb
|
|
|
|
*/
|
2013-05-10 21:09:55 +02:00
|
|
|
public function setColor($rgb)
|
|
|
|
{
|
2013-09-11 16:35:18 +02:00
|
|
|
$this->color = $rgb;
|
2013-05-10 21:09:55 +02:00
|
|
|
}
|
2013-09-11 16:35:18 +02:00
|
|
|
}
|