As I understand it in PHP the constructor of the parent class is not called
when a child class is initiated.

You can call it manually. Eg., using your example:

class one
{
    function one()
    {
        echo "one ";
     }
}

class two extends one
{
    function two()
    {
        one::one();
        echo "two ";
    }
}

class three extends two
{
    function three()
    {
        two::two();
        echo "three";
    }
}

$foo = new three();

$foo should now equal 'one two three'. (:: lets you access functions from
within a class without explicitly declaring a new object).

Hope this helps (PS. The PHP Developer's Cookbook by Sterling Hughes has a
short but good chapter on classes).

Aral :)
______________________________
([EMAIL PROTECTED])
    New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
    Adj. Prof., American University
??????????????????????????????



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to