Memento design pattern php