Kristian K�hntopp wrote:
> In fact, setters, getters and wrappers provide a great
> policy-agnostic mechanism to introduce policies of the
> implementors choosing.
A final note: Sebastian told me that in ZE 2, constructors and
destructors have a fixed name like __construct() and
__destruct(). If so, the following breakage cannot be reproduced
in PHP with ZE 2, which is good.
Example:
class __get {
function __get() {
echo "I am the constructor for __get\n";
}
}
class Bomb extends __get {
...
}
overload("Bomb");
$bang = new Bomb;
Because Bomb does not have a constructor, the inherited
constructor __get() is called. Because Bomb is overloaded, this
also is a getter. This is not sane, but hopefully will not be an
issue in ZE 2 based PHPs.
Shouldn't overload() be enabled on all clases, just as
constructors are? This will pretty much avoid the issue, I think.
Kristian
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php