Date: 12/14/00
- Next message: Olivier Cahagne: "Re: [PHP-DEV] run-tests.php results"
- Previous message: Kristian Köhntopp: "Re: [PHP-DEV] Windows phpinfo() output"
- In reply to: Alan van den Bosch: "Re: [PHP-DEV] Calling parent's constructor"
- Next in thread: Kristian Köhntopp: "Re: [PHP-DEV] Calling parent's constructor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alan van den Bosch wrote:
> Just a thought - If the desired functionality _only_ applies to the parent
> class constructor why not just __parent(). On the other hand, this could be
> further extended to call any parent class function with
> __parent::some_func() and a call to the parent constructor looking like
> __parent::__parent().
We already have parent::some_func(). It is just that the
name of the constructor in the parent class is not a constant
like __init(), but dependent on the actual name of the
parent class. So you cannot call parent::__init(), but you
have to use a pseudo-name parent::__parent(), where PHP
resolves the __parent() part to the actual constructor
name.
Or you'd change constructors to have a constant name,
like, say, __init(), and keep some compatibility logic
to emulate the old behaviour.
Kristian
-- Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel Tel: +49 431 386 436 00, Fax: +49 431 386 435 99 Using PHP3? See our web development library at http://phplib.netuse.de/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Olivier Cahagne: "Re: [PHP-DEV] run-tests.php results"
- Previous message: Kristian Köhntopp: "Re: [PHP-DEV] Windows phpinfo() output"
- In reply to: Alan van den Bosch: "Re: [PHP-DEV] Calling parent's constructor"
- Next in thread: Kristian Köhntopp: "Re: [PHP-DEV] Calling parent's constructor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

