This is something I was thinking about the other day.
I want to have a singleton-like object. Instead of a single instance of a class, I want to have a single object with a matching variable.
For instance.
an existing employee object has a employee_id = 100 the getEmployee static method is called with employee_id = 100, i want to return the already existing object with the matching employee_id or create it if it does not exist.
can this be done?
Thanks