I have a \"library\" of objects that I want to load on the fly from a database. Each object comes with its own special functions that are called at specific times depending
A better approach might be to serialize the object's properties when you "sleep" it, and "waking" the object by reattaching its properties to a new instance of the object with the appropriate methods defined.