Re: class constructor overloading

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

 



Alain Roger wrote:
thanks a lot, this is exactly what i needed.
if the construct of based class A accept arguments, i guess that construct
of class B must have the sames.
moreover, i guess that something like that must be written:
class A
{
  function __construct($nameA)
  {
    ...
  }
}

class B extends A
{
  function __construct($nameB)
  {
    parent::__construct($nameB);
  }
}

am i right ?

thanks.

A.


Yes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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