added abstract factory and factory pattern

This commit is contained in:
Dominik Liebler
2011-08-21 16:03:10 +02:00
parent 9569c1e693
commit afb62569d3
5 changed files with 155 additions and 0 deletions

24
AbstractFactory/Text.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: dominik
* Date: 21.08.11
* Time: 15:42
* To change this template use File | Settings | File Templates.
*/
namespace DesignPatterns\AbstractFactory;
class Text implements Media
{
/**
*
* @var string
*/
protected $_text;
public function __construct($text)
{
$this->_text = $text;
}
}