I'm looking for a PHP object concept to implement in my code.
I have records of data returned from Moodle db calls - so an array of generic objects. I want to use this array of data in my own class, to apply specific rules to it. I could take the generic array and iterate through it, creating a new array of objects, but that would have overhead of copying data from one structure to another. What I would like to do is lay the existing data into the object and have that object now manage that data directly.
Is this possible in PHP? Does this make sense at all? Is there something in Moodle (persistents?) that does this already?