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

View File

@@ -0,0 +1,27 @@
<?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 Picture implements Media
{
protected $_path;
protected $_name;
/**
*
* @param string $path
* @param string $name
*/
public function __construct($path, $name = '')
{
$this->_name = (string) $name;
$this->_path = (string) $path;
}
}