One class, many methods: PHP4.x: Q's
| From: | Micky Hulse | Date: | Thu, 10 May 2007 13:54:11 +0000 |
| Subject: | One class, many methods: PHP4.x: Q's | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-254725@lists.php.net to get a copy of this message | ||
Hi,
This might be a real obvious question/answer... but I have been up all night geeking on code, so my mind is kinda mushy -- please be kind. :)
I have a class called Randimg. Within that class, I have several methods. Within a few of those methods, I use the below code snippet:
$_SERVER['DOCUMENT_ROOT']
What would be the best way to assign the above code to a global variable/constant within the class?
Also, within each method, I am returning error strings... I would like to create these as class constants... Or something... What is best way to setup static strings within my class? Basically, I would like to have these strings at the top of my class so potential users can easily change the "settings." ;)
Lol, sorry is stoooopid questions... I am still kinda new to PHP OOP.
Many TIA's!
Cheers,
Micky
--
Wishlists: <http://snipurl.com/1gqpj>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>