OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Class help get instance name
This page's ID:
31574
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Problem im trying to write reusable code that will automatically get the instance name. example [code] class Object() { public static nulls = array(blah blah blah); public static function fill_nulls($post, $object_name){ foreach(static::$nulls as $key => $val){ if($post[$val] == '' || !isset($post[$val])){ $$object_name->$key = "NULL"; } } } } $object = new Object(); [/code] instead of setting a variable to be the name of the object is there a way to dynamiclly get the name of the new object so if the name changes the code doesnt have too?
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail