I have a really GIANT array in legacy code. like 500k+ from db entries. It gets populatet once on user login. The global user array so to speak.
Now I got the unthankfull quest to refacture thisbad boy.
the array is a 1 dimensional assighned array like
$data['username'] = 'idiots'; ( and tons of other values)
Now i want to refacture this in a object wich would call the value from the DB only when i really need it. My idea was to replace the array assighnment part with an object.
So where $user = array(); I want user $user = new user();
Is there any known way to acess a class function so i can acess its propertys via the $user['name'] so it gets passed to the __get method?
I know it is a tall order, and it is probably imposible. But il ask anyway :)