File tree Expand file tree Collapse file tree 10 files changed +24
-24
lines changed
ca/LC_MESSAGES/Creational/SimpleFactory
es/LC_MESSAGES/Creational/SimpleFactory
pt_BR/LC_MESSAGES/Creational/SimpleFactory
ru/LC_MESSAGES/Creational/SimpleFactory
zh_CN/LC_MESSAGES/Creational/SimpleFactory Expand file tree Collapse file tree 10 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Simple Factory
4
4
Purpose
5
5
-------
6
6
7
- ConcreteFactory is a simple factory pattern.
7
+ SimpleFactory is a simple factory pattern.
8
8
9
9
It differs from the static factory because it is NOT static and as you
10
10
know: static => global => evil!
24
24
25
25
You can also find these code on `GitHub `_
26
26
27
- ConcreteFactory .php
27
+ SimpleFactory .php
28
28
29
- .. literalinclude :: ConcreteFactory .php
29
+ .. literalinclude :: SimpleFactory .php
30
30
:language: php
31
31
:linenos:
32
32
53
53
54
54
.. code :: php
55
55
56
- $factory = new ConcreteFactory ();
56
+ $factory = new SimpleFactory ();
57
57
$bicycle = $factory->createVehicle('bicycle');
58
58
$bicycle->driveTo('Paris');
59
59
Original file line number Diff line number Diff line change 3
3
namespace DesignPatterns \Creational \SimpleFactory ;
4
4
5
5
/**
6
- * class ConcreteFactory .
6
+ * class SimpleFactory .
7
7
*/
8
- class ConcreteFactory
8
+ class SimpleFactory
9
9
{
10
10
/**
11
11
* @var array
Original file line number Diff line number Diff line change 2
2
3
3
namespace DesignPatterns \Creational \SimpleFactory \Tests ;
4
4
5
- use DesignPatterns \Creational \SimpleFactory \ConcreteFactory ;
5
+ use DesignPatterns \Creational \SimpleFactory \SimpleFactory ;
6
6
7
7
/**
8
8
* SimpleFactoryTest tests the Simple Factory pattern.
@@ -13,7 +13,7 @@ class SimpleFactoryTest extends \PHPUnit_Framework_TestCase
13
13
14
14
protected function setUp ()
15
15
{
16
- $ this ->factory = new ConcreteFactory ();
16
+ $ this ->factory = new SimpleFactory ();
17
17
}
18
18
19
19
public function getType ()
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<Diagram >
3
3
<ID >PHP</ID >
4
- <OriginalElement >\DesignPatterns\Creational\SimpleFactory\ConcreteFactory </OriginalElement >
4
+ <OriginalElement >\DesignPatterns\Creational\SimpleFactory\SimpleFactory </OriginalElement >
5
5
<nodes >
6
6
<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 >
8
8
<node x =" 86.5" y =" 0.0" >\DesignPatterns\Creational\SimpleFactory\VehicleInterface</node >
9
9
<node x =" 0.0" y =" 97.0" >\DesignPatterns\Creational\SimpleFactory\Bicycle</node >
10
10
</nodes >
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ msgid "Purpose"
20
20
msgstr ""
21
21
22
22
#: ../../Creational/SimpleFactory/README.rst:7
23
- msgid "ConcreteFactory is a simple factory pattern."
23
+ msgid "SimpleFactory is a simple factory pattern."
24
24
msgstr ""
25
25
26
26
#: ../../Creational/SimpleFactory/README.rst:9
@@ -48,7 +48,7 @@ msgid "You can also find these code on `GitHub`_"
48
48
msgstr ""
49
49
50
50
#: ../../Creational/SimpleFactory/README.rst:27
51
- msgid "ConcreteFactory .php"
51
+ msgid "SimpleFactory .php"
52
52
msgstr ""
53
53
54
54
#: ../../Creational/SimpleFactory/README.rst:33
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ msgid "Purpose"
20
20
msgstr ""
21
21
22
22
#: ../../Creational/SimpleFactory/README.rst:7
23
- msgid "ConcreteFactory is a simple factory pattern."
23
+ msgid "SimpleFactory is a simple factory pattern."
24
24
msgstr ""
25
25
26
26
#: ../../Creational/SimpleFactory/README.rst:9
@@ -48,7 +48,7 @@ msgid "You can also find these code on `GitHub`_"
48
48
msgstr ""
49
49
50
50
#: ../../Creational/SimpleFactory/README.rst:27
51
- msgid "ConcreteFactory .php"
51
+ msgid "SimpleFactory .php"
52
52
msgstr ""
53
53
54
54
#: ../../Creational/SimpleFactory/README.rst:33
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ msgid "Purpose"
20
20
msgstr ""
21
21
22
22
#: ../../Creational/SimpleFactory/README.rst:7
23
- msgid "ConcreteFactory is a simple factory pattern."
23
+ msgid "SimpleFactory is a simple factory pattern."
24
24
msgstr ""
25
25
26
26
#: ../../Creational/SimpleFactory/README.rst:9
@@ -48,7 +48,7 @@ msgid "You can also find these code on `GitHub`_"
48
48
msgstr ""
49
49
50
50
#: ../../Creational/SimpleFactory/README.rst:27
51
- msgid "ConcreteFactory .php"
51
+ msgid "SimpleFactory .php"
52
52
msgstr ""
53
53
54
54
#: ../../Creational/SimpleFactory/README.rst:33
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ msgid "Purpose"
20
20
msgstr "Назначение"
21
21
22
22
#: ../../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 в примере ниже, это паттерн «Простая Фабрика»."
25
25
26
26
#: ../../Creational/SimpleFactory/README.rst:9
27
27
msgid ""
@@ -53,8 +53,8 @@ msgid "You can also find these code on `GitHub`_"
53
53
msgstr "Вы можете найти этот код на `GitHub`_"
54
54
55
55
#: ../../Creational/SimpleFactory/README.rst:27
56
- msgid "ConcreteFactory .php"
57
- msgstr "ConcreteFactory .php"
56
+ msgid "SimpleFactory .php"
57
+ msgstr "SimpleFactory .php"
58
58
59
59
#: ../../Creational/SimpleFactory/README.rst:33
60
60
msgid "VehicleInterface.php"
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ msgid "Purpose"
20
20
msgstr "目的"
21
21
22
22
#: ../../Creational/SimpleFactory/README.rst:7
23
- msgid "ConcreteFactory is a simple factory pattern."
23
+ msgid "SimpleFactory is a simple factory pattern."
24
24
msgstr "简单的创建对象型工厂模式"
25
25
26
26
#: ../../Creational/SimpleFactory/README.rst:9
@@ -52,7 +52,7 @@ msgid "You can also find these code on `GitHub`_"
52
52
msgstr "你可以在 `GitHub`_ 上找到这些代码"
53
53
54
54
#: ../../Creational/SimpleFactory/README.rst:27
55
- msgid "ConcreteFactory .php"
55
+ msgid "SimpleFactory .php"
56
56
msgstr ""
57
57
58
58
#: ../../Creational/SimpleFactory/README.rst:33
You can’t perform that action at this time.
0 commit comments