opatrickvico/history

There is no license information available for the latest version (1.0.0) of this package.

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

1.0.0 2023-12-13 13:10 UTC

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.