Re: $this assignment and call_user_func question

From: Date: Wed, 16 Jul 2003 10:44:32 +0000
Subject: Re: $this assignment and call_user_func question
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-3443@lists.php.net to get a copy of this message
Hi Marcus, On Wednesday 16 July 2003 12:14, Marcus Börger wrote: > MS> Since PHP5 should also give a boost to PECL, I think there should be a > way to MS> extend a C-based class, somehow. I really don't favor the $this > assignment as MS> well, but what other option is there? Or is this > specifick for the way the MS> domxml module is setup, and people shouldn't > write their classes like that? > > I really can't follow you...it's all to weird. > anyway maybe you have a problem with the domxml class. Maybe you don't > understand oo at all, i don't know. There are surely things I don't understand, but this isn't one of them. > The one thing i can think of is that you try to overcome th oo principle of > 'is-a' what is a bad idea. Yep, that's exactly what I was trying to do. A shame you feel it's a bad idea, as it allows code to remain dynamic. > class bla { > prublic $dom; > function __construct() { > $dom = new .... > } > } > > and then youse proxies. As i can read in your comments it seems you to lazy > to write the necessary proxies. Lazyness is one motivation I won't deny. Another is excessive code - it seems like a complete waste to me. A third is, it won't be forwards compatible. I will have to sync the proxies, with whatever methods are added/changed on the original object. -- Melvyn

« previous php.internals (#3443) next »