mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-11 01:14:01 +02:00
added abstract factory and factory pattern
This commit is contained in:
27
AbstractFactory/Picture.php
Normal file
27
AbstractFactory/Picture.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user