Re: $this in an XML data handler ... in a class

From: Date: Thu, 04 Jul 2002 20:55:31 +0000
Subject: Re: $this in an XML data handler ... in a class
Groups: php.general 
Request: Send a blank email to php-general+get-105509@lists.php.net to get a copy of this message
>I'm convinced this has to be a bug ... Because what good is a "contained" >class if you've got to interact with global variables in order to get the >job done? Theoretically speaking, how do you know that you're not stepping >on the toes of some other global variable? > >This solution may be good enough for me and you ... If we're not writing >classes for distribution ... But they go against the grain of all the >bennies I've read about classes. > >I'm not normally one to "cry 'BUG!'" ... But I think this qualifies. Do >you >agree? Try passing around &$object instead of just $object. $object may be getting "copied" when you don't want it to. I can't be more specific about where/when to do this, since I have never seen a project that really needs XML (except parsing the XML documents provided by other projects that mindlessly followed the hype and used XML) and I've never seen a web-page "big" enough to really need a class system, what with only 2 seconds to spew out the HTML, I just don't see how that much bloat is a Good Thing (tm). YMMV. If it really is a bug, please feel free to edit the XML and Class object system source from http://cvs.php.net/ and submit a patch. NOTE: XML would be great for a distributed-data environment. If I ever need to write a distributed-data environment, I'll consider XML. Meanwhile, there are a zillion development dollars going into a migration to XML, and I'm damned if I can figure out why. Oh well. Not my money. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#105509) next »