Iterate a model's attributes within the model? |
[eluser]Dam1an[/eluser]
You can read about magic methods here The idea behind the __get/__set methods, is it provides a nice way for manipulating private variables, so you could do something like Code: private $attributes = array(); You could then just loop through the array as before in the get method |
Welcome Guest, Not a member yet? Register Sign In |