1
- #
1
+ #
2
2
msgid ""
3
3
msgstr ""
4
4
"Project-Id-Version : DesignPatternsPHP 1.0\n "
@@ -19,67 +19,117 @@ msgstr ""
19
19
msgid "Purpose"
20
20
msgstr ""
21
21
22
- #: ../../Behavioral/Memento/README.rst:7
23
- msgid ""
24
- "Provide the ability to restore an object to its previous state (undo via "
25
- "rollback)."
26
- msgstr ""
27
-
28
- #: ../../Behavioral/Memento/README.rst:10
29
- msgid ""
30
- "The memento pattern is implemented with three objects: the originator, a "
31
- "caretaker and a memento. The originator is some object that has an internal "
32
- "state. The caretaker is going to do something to the originator, but wants "
33
- "to be able to undo the change. The caretaker first asks the originator for a"
34
- " memento object. Then it does whatever operation (or sequence of operations)"
35
- " it was going to do. To roll back to the state before the operations, it "
36
- "returns the memento object to the originator. The memento object itself is "
37
- "an opaque object (one which the caretaker cannot, or should not, change). "
38
- "When using this pattern, care should be taken if the originator may change "
39
- "other objects or resources - the memento pattern operates on a single "
40
- "object."
41
- msgstr ""
42
-
43
- #: ../../Behavioral/Memento/README.rst:23
22
+ #: ../../Behavioral/Memento/README.rst:39
44
23
msgid "Examples"
45
24
msgstr ""
46
25
47
- #: ../../Behavioral/Memento/README.rst:25
26
+ #: ../../Behavioral/Memento/README.rst:41
48
27
msgid "The seed of a pseudorandom number generator"
49
28
msgstr ""
50
29
51
- #: ../../Behavioral/Memento/README.rst:26
30
+ #: ../../Behavioral/Memento/README.rst:42
52
31
msgid "The state in a finite state machine"
53
32
msgstr ""
54
33
55
- #: ../../Behavioral/Memento/README.rst:29
34
+ #: ../../Behavioral/Memento/README.rst:46
56
35
msgid "UML Diagram"
57
36
msgstr ""
58
37
59
- #: ../../Behavioral/Memento/README.rst:36
38
+ #: ../../Behavioral/Memento/README.rst:53
60
39
msgid "Code"
61
40
msgstr ""
62
41
63
- #: ../../Behavioral/Memento/README.rst:38
42
+ #: ../../Behavioral/Memento/README.rst:55
64
43
msgid "You can also find these code on `GitHub`_"
65
44
msgstr ""
66
45
67
- #: ../../Behavioral/Memento/README.rst:40
46
+ #: ../../Behavioral/Memento/README.rst:57
68
47
msgid "Memento.php"
69
48
msgstr ""
70
49
71
- #: ../../Behavioral/Memento/README.rst:46
50
+ #: ../../Behavioral/Memento/README.rst:63
72
51
msgid "Originator.php"
73
52
msgstr ""
74
53
75
- #: ../../Behavioral/Memento/README.rst:52
54
+ #: ../../Behavioral/Memento/README.rst:69
76
55
msgid "Caretaker.php"
77
56
msgstr ""
78
57
79
- #: ../../Behavioral/Memento/README.rst:59
58
+ #: ../../Behavioral/Memento/README.rst:76
80
59
msgid "Test"
81
60
msgstr ""
82
61
83
- #: ../../Behavioral/Memento/README.rst:61
62
+ #: ../../Behavioral/Memento/README.rst:78
84
63
msgid "Tests/MementoTest.php"
85
64
msgstr ""
65
+
66
+ #: ../../Behavioral/Memento/README.rst:7
67
+ msgid ""
68
+ "It provides the ability to restore an object to it's previous state (undo "
69
+ "via rollback) or to gain access to state of the object, without revealing "
70
+ "it's implementation (i.e., the object is not required to have a functional "
71
+ "for return the current state)."
72
+ msgstr ""
73
+
74
+ #: ../../Behavioral/Memento/README.rst:12
75
+ msgid ""
76
+ "The memento pattern is implemented with three objects: the Originator, a "
77
+ "Caretaker and a Memento."
78
+ msgstr ""
79
+
80
+ #: ../../Behavioral/Memento/README.rst:15
81
+ msgid ""
82
+ "Memento – an object that *contains a concrete unique snapshot of state* of "
83
+ "any object or resource: string, number, array, an instance of class and so "
84
+ "on. The uniqueness in this case does not imply the prohibition existence of "
85
+ "similar states in different snapshots. That means the state can be extracted"
86
+ " as the independent clone. Any object stored in the Memento should be *a "
87
+ "full copy of the original object rather than a reference* to the original "
88
+ "object. The Memento object is a \" opaque object\" (the object that no one "
89
+ "can or should change)."
90
+ msgstr ""
91
+
92
+ #: ../../Behavioral/Memento/README.rst:24
93
+ msgid ""
94
+ "Originator – it is an object that contains the *actual state of an external "
95
+ "object is strictly specified type*. Originator is able to create a unique "
96
+ "copy of this state and return it wrapped in a Memento. The Originator does "
97
+ "not know the history of changes. You can set a concrete state to Originator "
98
+ "from the outside, which will be considered as actual. The Originator must "
99
+ "make sure that given state corresponds the allowed type of object. "
100
+ "Originator may (but not should) have any methods, but they *they can't make "
101
+ "changes to the saved object state*."
102
+ msgstr ""
103
+
104
+ #: ../../Behavioral/Memento/README.rst:33
105
+ msgid ""
106
+ "Caretaker *controls the states history*. He may make changes to an object; "
107
+ "take a decision to save the state of an external object in the Originator; "
108
+ "ask from the Originator snapshot of the current state; or set the Originator"
109
+ " state to equivalence with some snapshot from history."
110
+ msgstr ""
111
+
112
+ #: ../../Behavioral/Memento/README.rst:43
113
+ msgid ""
114
+ "Control for intermediate states of `ORM Model <http://en.wikipedia.org/wiki"
115
+ "/Object-relational_mapping>`_ before saving"
116
+ msgstr ""
117
+
118
+ #~ msgid ""
119
+ #~ "Provide the ability to restore an object to its previous state (undo via "
120
+ #~ "rollback)."
121
+ #~ msgstr ""
122
+
123
+ #~ msgid ""
124
+ #~ "The memento pattern is implemented with three objects: the originator, a "
125
+ #~ "caretaker and a memento. The originator is some object that has an internal "
126
+ #~ "state. The caretaker is going to do something to the originator, but wants "
127
+ #~ "to be able to undo the change. The caretaker first asks the originator for a"
128
+ #~ " memento object. Then it does whatever operation (or sequence of operations)"
129
+ #~ " it was going to do. To roll back to the state before the operations, it "
130
+ #~ "returns the memento object to the originator. The memento object itself is "
131
+ #~ "an opaque object (one which the caretaker cannot, or should not, change). "
132
+ #~ "When using this pattern, care should be taken if the originator may change "
133
+ #~ "other objects or resources - the memento pattern operates on a single "
134
+ #~ "object."
135
+ #~ msgstr ""
0 commit comments