I’ve been adding wizards to my ATK UI - based application, and using the memorize function to store data between steps. I’ve come across a nasty “feature” that I’m trying to get around. The problem strikes when I want to store the string ‘Date’. Since memorize uses call_user_func, what actually gets stored is the current date. When reading it back with recall, this is not desirable – especially because I’m trying to read it back into an enum field, where ‘Date’ is a valid value, but the current date as of the time I called memorize almost certainly is not.
I could get around this, I suppose, by creating a Wizard class of my own, that replaces the memorize method with my own version that doesn’t uses call_user_func. However, if I don’t replace the entire
SessionTrait, which seems like overkill, I’d run the risk of something breaking if SessionTrait gets adjusted in a future release. Is there a better way to get this done?
Thanks in advance for your thoughts.