I've been using Doctrine, and one of the features that I like (simply because it is pretty) is the ability to access member variables as if the object were an array. For example, all of the following lines are equivalent to each other:
Code: Select all
echo $user->username;
echo $user->get('username');
echo $user->getUsername;
echo $user['username'];Does anybody know how to do it, or even have any ideas? Let me know if I've been at all unclear.
Thank you!
Matt