RE: [PHP] How to find the object name in a class?

2001-04-24 Thread Boget, Chris
> *sigh* I'm thinking so too ;( > Doh! > However, I have at least a usable hack around. > In the constructor of your class, add: > function Class ($object_name) { > global $pge; > $pge = $object_name; > } > Then when you use create a new object of that type you must use: > $objectname = new Class(

Re: [PHP] How to find the object name in a class?

2001-04-23 Thread Plutarck
*sigh* I'm thinking so too ;( Doh! However, I have at least a usable hack around. In the constructor of your class, add: function Class ($object_name) { global $pge; $pge = $object_name; } Then when you use create a new object of that type you must use: $objectname = new Class('objectname')

RE: [PHP] How to find the object name in a class?

2001-04-23 Thread Boget, Chris
> So is there ANY way to get the name of the object in PHP code without > knowing the name of the object ahead of time? I went through this exact thing not too long ago with an error class I wrote. Unfortunately, there is no way to know. What you can do, however, is do a check to see if that ob

[PHP] How to find the object name in a class?

2001-04-23 Thread Plutarck
I've been using a function to output HTML to the user's browser, and now my use has made it neccessary to put it all inside a class. All's going find and dandy and I've got it all working. However one of it's variables is $front_page. Now in other pages there are references to $front_page, and I