Re: Re: PHP5 OOP: Abstract classes, multiple inheritance and constructors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's no way to bypass an overridden method using "parent", but you could
add an abstract method that Child would implement.

    class Parent
        function __construct() {
            $this->foo = $this->getFoo();
        }

        abstract function getFoo();
    }

David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux