- Impact
- 1
I was wondering how to share values between one class and an extension of it, where the value would first be assigned by the main class and be used by the extension after being assigned?
if that confuses you, here is an example of what I am trying to do:
if that confuses you, here is an example of what I am trying to do:
PHP:
class SomeClass {
function someFunction($assign_me=' '){
$assign_me == FALSE ? $assign_me = ' ' : $assign_me = "IMASSIGNED";
}
}
class AnotherClass extends SomeClass{
function isAssigned(){
if($assign_me = "IMASSIGNED"){
echo "It Has Been Assigned";
}
}
}















