07-14-2008, 03:31 PM
|
#13 (permalink)
|
|
The Acquainted
Join Date: May 2008
Posts: 175
Thanks: 9
|
Quote:
Originally Posted by CMellor
Urm, yeah, what he said ^
I'd always used define and remembered once I saw a different way of doing that with OOP, ala const so seeing as I love being different, I did it that way :P
|
Though what you do is correct. Constants are usually accessed through the self:: or ClassName:: while properties (public variables) are accessed through $this.
I've seen some really funky stuff going along with inheritance and constants though so I stayed away from them :D
__________________
There are No Stupid Questions. But there a LOT of Inquisitive Idiots.
|
|
|