Re: inheritance php4

From: Date: Tue, 12 Dec 2006 19:03:19 +0000
Subject: Re: inheritance php4
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-245768@lists.php.net to get a copy of this message
nevermind, I was doing something stupid. On 12/12/06, blackwater dev <blackwaterdev@gmail.com> wrote:
Ok, I have a class which inherits from a parent class. My first thought is that the child class inherits all of the functions of the parent but that doesn't seem to be the case, do I really have to put parent::somefunction() to call each one? Why can't I just use $this->parentfunction(); within the child class? Thanks! class Parent{
     function getAddress(){}
} class Child extends Parent{
    function getInfo(){
    $this->getAddress(); //throws error
} }


« previous php.general (#245768) next »