I want to pull all info about a file from a files table, but that table’s structure might change.
So, I’d like to pull all the field names from the table and use them to generate the class variables that contain the information, then store the selected data to them.
Is this possible?
Sample
Output
As you can see, a property that wasn’t defined was created just by assigning to it using a reference to
$this. So yes, you can define class variable from within a class method.