I have a class that acts as a data mapper for a database table. Instead of hand coding get and set functions for every field in the table is there a way I can make the class dynamically create it's own getters and setters for each field? I could do it using the create_function() but i don't want to create all of these functions dynamically every time I load a new page.
I'm somewhat new too OOP and the Model-View-Controller structure so I may have mistakes in my architecture.
Any guidance is appreciated. Thanks in advance.