Re: parent_ctor()

From: Date: Tue, 18 Jul 2000 16:11:26 +0000
Subject: Re: parent_ctor()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24972@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > KK>> disadvantage: major change in object system, will need much > KK>> additional thought. > > That's not a major change, gettype can easily return class name of object > instead of "object". Right. The major change is the changed settype() semantics, which can be one of two: class A { ... } $a = new A; settype($a, "B"); a) $a can now actually be a B, and have all slots and methods of B, or b) $a can now poseAs B, but still have the slots and methods of A. For some reasons I think that b) is the better was to handle this, but explaining that will lead to far for this evening (I would have to introduce some additional concepts such as delegates, which you will find not to be essential, but which are interesting in some more advanced designs). 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/

« previous php.dev (#24972) next »