Dynamic function creation?



for example, i have a class, e.g.

class User {


var $name;
var $age;
var $blah;

}

The user has many atttibutes, i want to provide each of them with
getter & setter function, but it is time consuming to type all the
functions for all attributes...

is it possible to dynamically create function? so I only need to
declare one setter, and one getter?

thanks.

.



Relevant Pages

  • Re: cookies problem
    ... my problem is i cant register cookie ... i use this code to check cookie and seesion and it is included to all ... it is part of class user but because the class "user" ... var $username; ...
    (comp.lang.php)
  • Re: cookies problem
    ... my problem is i cant register cookie ... i use this code to check cookie and seesion and it is included to all ... it is part of class user but because the class "user" ... var $username; ...
    (comp.lang.php)
  • Re: cookies problem
    ... my problem is i cant register cookie ... i use this code to check cookie and seesion and it is included to all ... it is part of class user but because the class "user" ... var $username; ...
    (comp.lang.php)
  • Re: cookies problem
    ... my problem is i cant register cookie ... i use this code to check cookie and seesion and it is included to all ... it is part of class user but because the class "user" ... var $username; ...
    (comp.lang.php)
  • Re: Dynamic function creation?
    ... var $name; ... getter & setter function, but it is time consuming to type all the ...
    (comp.lang.php)