diff --git a/AbstractFactory/AbstractFactory.php b/AbstractFactory/AbstractFactory.php index ea5253b..6db43b8 100644 --- a/AbstractFactory/AbstractFactory.php +++ b/AbstractFactory/AbstractFactory.php @@ -1,42 +1,43 @@ ', $this->_path, $this->_name); + } + +} \ No newline at end of file diff --git a/AbstractFactory/Html/Text.php b/AbstractFactory/Html/Text.php new file mode 100644 index 0000000..49be0dc --- /dev/null +++ b/AbstractFactory/Html/Text.php @@ -0,0 +1,22 @@ +" . htmlspecialchars($this->_text) . ''; + } + +} \ No newline at end of file diff --git a/AbstractFactory/HtmlFactory.php b/AbstractFactory/HtmlFactory.php new file mode 100644 index 0000000..7c9712c --- /dev/null +++ b/AbstractFactory/HtmlFactory.php @@ -0,0 +1,25 @@ + $this->_name, 'path' => $this->_path)); + } + +} \ No newline at end of file diff --git a/AbstractFactory/Json/Text.php b/AbstractFactory/Json/Text.php new file mode 100644 index 0000000..d9aa4b3 --- /dev/null +++ b/AbstractFactory/Json/Text.php @@ -0,0 +1,22 @@ + $this->_text)); + } + +} \ No newline at end of file diff --git a/AbstractFactory/JsonFactory.php b/AbstractFactory/JsonFactory.php new file mode 100644 index 0000000..e8a6059 --- /dev/null +++ b/AbstractFactory/JsonFactory.php @@ -0,0 +1,26 @@ +createText('Lorem Ipsum'), + $factory->createPicture('/image.jpg', 'caption'), + $factory->createText('footnotes') + ); + + $this->assertContainsOnly('DesignPatterns\AbstractFactory\Media', $article); + } + +} \ No newline at end of file