I have a World class that has a User object as a member.
I declare it as:
Code: Select all
[b]var $mainUser;[/b]Code: Select all
[b]$mainUser = new User();[/b]Code: Select all
function data(){
return $this->mainUser->getUserdata();
}