mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
# msgid "" msgstr "" "Project-Id-Version: DesignPatternsPHP 1.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../Behavioral/Memento/README.rst:2 msgid "`Memento`__" msgstr "" #: ../../Behavioral/Memento/README.rst:5 msgid "Purpose" msgstr "" #: ../../Behavioral/Memento/README.rst:39 msgid "Examples" msgstr "" #: ../../Behavioral/Memento/README.rst:41 msgid "The seed of a pseudorandom number generator" msgstr "" #: ../../Behavioral/Memento/README.rst:42 msgid "The state in a finite state machine" msgstr "" #: ../../Behavioral/Memento/README.rst:46 msgid "UML Diagram" msgstr "" #: ../../Behavioral/Memento/README.rst:53 msgid "Code" msgstr "" #: ../../Behavioral/Memento/README.rst:55 msgid "You can also find these code on `GitHub`_" msgstr "" #: ../../Behavioral/Memento/README.rst:57 msgid "Memento.php" msgstr "" #: ../../Behavioral/Memento/README.rst:63 msgid "Originator.php" msgstr "" #: ../../Behavioral/Memento/README.rst:69 msgid "Caretaker.php" msgstr "" #: ../../Behavioral/Memento/README.rst:76 msgid "Test" msgstr "" #: ../../Behavioral/Memento/README.rst:78 msgid "Tests/MementoTest.php" msgstr "" #: ../../Behavioral/Memento/README.rst:7 msgid "" "It provides the ability to restore an object to it's previous state (undo " "via rollback) or to gain access to state of the object, without revealing " "it's implementation (i.e., the object is not required to have a functional " "for return the current state)." msgstr "" #: ../../Behavioral/Memento/README.rst:12 msgid "" "The memento pattern is implemented with three objects: the Originator, a " "Caretaker and a Memento." msgstr "" #: ../../Behavioral/Memento/README.rst:15 msgid "" "Memento – an object that *contains a concrete unique snapshot of state* of " "any object or resource: string, number, array, an instance of class and so " "on. The uniqueness in this case does not imply the prohibition existence of " "similar states in different snapshots. That means the state can be extracted" " as the independent clone. Any object stored in the Memento should be *a " "full copy of the original object rather than a reference* to the original " "object. The Memento object is a \"opaque object\" (the object that no one " "can or should change)." msgstr "" #: ../../Behavioral/Memento/README.rst:24 msgid "" "Originator – it is an object that contains the *actual state of an external " "object is strictly specified type*. Originator is able to create a unique " "copy of this state and return it wrapped in a Memento. The Originator does " "not know the history of changes. You can set a concrete state to Originator " "from the outside, which will be considered as actual. The Originator must " "make sure that given state corresponds the allowed type of object. " "Originator may (but not should) have any methods, but they *they can't make " "changes to the saved object state*." msgstr "" #: ../../Behavioral/Memento/README.rst:33 msgid "" "Caretaker *controls the states history*. He may make changes to an object; " "take a decision to save the state of an external object in the Originator; " "ask from the Originator snapshot of the current state; or set the Originator" " state to equivalence with some snapshot from history." msgstr "" #: ../../Behavioral/Memento/README.rst:43 msgid "" "Control for intermediate states of `ORM Model <http://en.wikipedia.org/wiki" "/Object-relational_mapping>`_ before saving" msgstr "" #~ msgid "" #~ "Provide the ability to restore an object to its previous state (undo via " #~ "rollback)." #~ msgstr "" #~ msgid "" #~ "The memento pattern is implemented with three objects: the originator, a " #~ "caretaker and a memento. The originator is some object that has an internal " #~ "state. The caretaker is going to do something to the originator, but wants " #~ "to be able to undo the change. The caretaker first asks the originator for a" #~ " memento object. Then it does whatever operation (or sequence of operations)" #~ " it was going to do. To roll back to the state before the operations, it " #~ "returns the memento object to the originator. The memento object itself is " #~ "an opaque object (one which the caretaker cannot, or should not, change). " #~ "When using this pattern, care should be taken if the originator may change " #~ "other objects or resources - the memento pattern operates on a single " #~ "object." #~ msgstr ""