If I set use a getter and setter in a parent class, can these be
accessible in an extended function? My example will set and get the
memberID in the test class, but I cannot seem to access it in the
extTest extended class.
Thank you for any and all help!
Example
class test {
// Setters
function setMemberID($iMemberID){
return $this->_iMemberID = $iMemberID;
}
function setProfileID($iProfileID){
return $this->_iProfileID = $iProfileID;
}
// Getters
function getMemberID(){
return $this->_iMemberID;
}
function getProfileID(){
return $this->_iProfileID;
}
}
class extTest extends Test {
var $memberID;
var $profileID;
function extTest(){
$this->memberID = parent::getMemberID();
$this->profileID = parent::getProfileID();
}
}
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/