Skip to content

Commit a2c70a0

Browse files
committed
89 - ConcreteFactory changed to SimpleFactory
1 parent 4904def commit a2c70a0

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

Creational/SimpleFactory/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Simple Factory
44
Purpose
55
-------
66

7-
ConcreteFactory is a simple factory pattern.
7+
SimpleFactory is a simple factory pattern.
88

99
It differs from the static factory because it is NOT static and as you
1010
know: static => global => evil!
@@ -24,9 +24,9 @@ Code
2424

2525
You can also find these code on `GitHub`_
2626

27-
ConcreteFactory.php
27+
SimpleFactory.php
2828

29-
.. literalinclude:: ConcreteFactory.php
29+
.. literalinclude:: SimpleFactory.php
3030
:language: php
3131
:linenos:
3232

@@ -53,7 +53,7 @@ Usage
5353

5454
.. code:: php
5555
56-
$factory = new ConcreteFactory();
56+
$factory = new SimpleFactory();
5757
$bicycle = $factory->createVehicle('bicycle');
5858
$bicycle->driveTo('Paris');
5959

Creational/SimpleFactory/ConcreteFactory.php renamed to Creational/SimpleFactory/SimpleFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace DesignPatterns\Creational\SimpleFactory;
44

55
/**
6-
* class ConcreteFactory.
6+
* class SimpleFactory.
77
*/
8-
class ConcreteFactory
8+
class SimpleFactory
99
{
1010
/**
1111
* @var array

Creational/SimpleFactory/Tests/SimpleFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace DesignPatterns\Creational\SimpleFactory\Tests;
44

5-
use DesignPatterns\Creational\SimpleFactory\ConcreteFactory;
5+
use DesignPatterns\Creational\SimpleFactory\SimpleFactory;
66

77
/**
88
* SimpleFactoryTest tests the Simple Factory pattern.
@@ -13,7 +13,7 @@ class SimpleFactoryTest extends \PHPUnit_Framework_TestCase
1313

1414
protected function setUp()
1515
{
16-
$this->factory = new ConcreteFactory();
16+
$this->factory = new SimpleFactory();
1717
}
1818

1919
public function getType()

Creational/SimpleFactory/uml/SimpleFactory.uml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Diagram>
33
<ID>PHP</ID>
4-
<OriginalElement>\DesignPatterns\Creational\SimpleFactory\ConcreteFactory</OriginalElement>
4+
<OriginalElement>\DesignPatterns\Creational\SimpleFactory\SimpleFactory</OriginalElement>
55
<nodes>
66
<node x="173.0" y="97.0">\DesignPatterns\Creational\SimpleFactory\Scooter</node>
7-
<node x="0.0" y="189.0">\DesignPatterns\Creational\SimpleFactory\ConcreteFactory</node>
7+
<node x="0.0" y="189.0">\DesignPatterns\Creational\SimpleFactory\SimpleFactory</node>
88
<node x="86.5" y="0.0">\DesignPatterns\Creational\SimpleFactory\VehicleInterface</node>
99
<node x="0.0" y="97.0">\DesignPatterns\Creational\SimpleFactory\Bicycle</node>
1010
</nodes>

Creational/SimpleFactory/uml/uml.svg

Lines changed: 2 additions & 2 deletions
Loading

locale/ca/LC_MESSAGES/Creational/SimpleFactory/README.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgid "Purpose"
2020
msgstr ""
2121

2222
#: ../../Creational/SimpleFactory/README.rst:7
23-
msgid "ConcreteFactory is a simple factory pattern."
23+
msgid "SimpleFactory is a simple factory pattern."
2424
msgstr ""
2525

2626
#: ../../Creational/SimpleFactory/README.rst:9
@@ -48,7 +48,7 @@ msgid "You can also find these code on `GitHub`_"
4848
msgstr ""
4949

5050
#: ../../Creational/SimpleFactory/README.rst:27
51-
msgid "ConcreteFactory.php"
51+
msgid "SimpleFactory.php"
5252
msgstr ""
5353

5454
#: ../../Creational/SimpleFactory/README.rst:33

locale/es/LC_MESSAGES/Creational/SimpleFactory/README.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgid "Purpose"
2020
msgstr ""
2121

2222
#: ../../Creational/SimpleFactory/README.rst:7
23-
msgid "ConcreteFactory is a simple factory pattern."
23+
msgid "SimpleFactory is a simple factory pattern."
2424
msgstr ""
2525

2626
#: ../../Creational/SimpleFactory/README.rst:9
@@ -48,7 +48,7 @@ msgid "You can also find these code on `GitHub`_"
4848
msgstr ""
4949

5050
#: ../../Creational/SimpleFactory/README.rst:27
51-
msgid "ConcreteFactory.php"
51+
msgid "SimpleFactory.php"
5252
msgstr ""
5353

5454
#: ../../Creational/SimpleFactory/README.rst:33

locale/pt_BR/LC_MESSAGES/Creational/SimpleFactory/README.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgid "Purpose"
2020
msgstr ""
2121

2222
#: ../../Creational/SimpleFactory/README.rst:7
23-
msgid "ConcreteFactory is a simple factory pattern."
23+
msgid "SimpleFactory is a simple factory pattern."
2424
msgstr ""
2525

2626
#: ../../Creational/SimpleFactory/README.rst:9
@@ -48,7 +48,7 @@ msgid "You can also find these code on `GitHub`_"
4848
msgstr ""
4949

5050
#: ../../Creational/SimpleFactory/README.rst:27
51-
msgid "ConcreteFactory.php"
51+
msgid "SimpleFactory.php"
5252
msgstr ""
5353

5454
#: ../../Creational/SimpleFactory/README.rst:33

locale/ru/LC_MESSAGES/Creational/SimpleFactory/README.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ msgid "Purpose"
2020
msgstr "Назначение"
2121

2222
#: ../../Creational/SimpleFactory/README.rst:7
23-
msgid "ConcreteFactory is a simple factory pattern."
24-
msgstr "ConcreteFactory в примере ниже, это паттерн «Простая Фабрика»."
23+
msgid "SimpleFactory is a simple factory pattern."
24+
msgstr "SimpleFactory в примере ниже, это паттерн «Простая Фабрика»."
2525

2626
#: ../../Creational/SimpleFactory/README.rst:9
2727
msgid ""
@@ -53,8 +53,8 @@ msgid "You can also find these code on `GitHub`_"
5353
msgstr "Вы можете найти этот код на `GitHub`_"
5454

5555
#: ../../Creational/SimpleFactory/README.rst:27
56-
msgid "ConcreteFactory.php"
57-
msgstr "ConcreteFactory.php"
56+
msgid "SimpleFactory.php"
57+
msgstr "SimpleFactory.php"
5858

5959
#: ../../Creational/SimpleFactory/README.rst:33
6060
msgid "VehicleInterface.php"

locale/zh_CN/LC_MESSAGES/Creational/SimpleFactory/README.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgid "Purpose"
2020
msgstr "目的"
2121

2222
#: ../../Creational/SimpleFactory/README.rst:7
23-
msgid "ConcreteFactory is a simple factory pattern."
23+
msgid "SimpleFactory is a simple factory pattern."
2424
msgstr "简单的创建对象型工厂模式"
2525

2626
#: ../../Creational/SimpleFactory/README.rst:9
@@ -52,7 +52,7 @@ msgid "You can also find these code on `GitHub`_"
5252
msgstr "你可以在 `GitHub`_ 上找到这些代码"
5353

5454
#: ../../Creational/SimpleFactory/README.rst:27
55-
msgid "ConcreteFactory.php"
55+
msgid "SimpleFactory.php"
5656
msgstr ""
5757

5858
#: ../../Creational/SimpleFactory/README.rst:33

0 commit comments

Comments
 (0)