opatrickvico / history
Class that implements the memento pattern poorly, allowing for undo/redo functionality;
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/opatrickvico/history
This package is not auto-updated.
Last update: 2026-01-08 21:32:40 UTC
README
Simple PHP class that (poorly) implements the memento pattern for undo/redo features.
How to use it
The class has three methods:
- addHistory: Takes the state you want to register. Everytime the state is changed, new history must be added;
- undo: Returns the previous state;
- redo: Returns the state ahead.