Forum Moderators: coopster
class siteBase{
function siteBase{
$this-var = "123";
}
}class siteUtilities{
function someMethod{
//How would I access $siteBase->var without having to instantiate it?
}
}
$siteBase = new siteBase();
$siteUtilities = new siteUtilities();
$siteUtilities->someMethod();
Then you can overload whatever you want. Have a look at [php.net...] and [php.net...] for more specific info on class constants.
[edited by: PHP_Chimp at 5:10 pm (utc) on July 4, 2008]
class siteBase {
const var = 123;
...
}
#
echo siteBase::var; #uses scope resolution operator