note 49380 added to keyword.parent

From: Date: Wed, 26 Jan 2005 08:08:22 +0000
Subject: note 49380 added to keyword.parent
Groups: php.notes 
Request: Send a blank email to php-notes+get-84005@lists.php.net to get a copy of this message
How can I call a methode of parrent class? Class master { var object; var dataInfo; Function master () { $this->object = new client ( $this ); } /* End Function */ Function GetData() { return ( $this->dataInfo ); } /* End Function */ } /* End Class */ Class client { var parentThis; Function client ( $this ) { $this->parentThis = $this; } /* End Function */ Function WhoIsYouMaster() { Echo $this->parentThis->GetData(); } /* End Function */ } /* End Class */ ---- Manual Page -- http://www.php.net/manual/en/keyword.parent.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49380 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49380&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49380&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49380&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49380&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49380&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49380&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84005) next »