I'm having a strange issue with OOP PHP, methods on my child that call methods on the parent that set properties on itself don't seem to work.
For example:
Child Class
class B extends A {
private function childMethod() {
// Some code
$this->parentClassMethod()
}
}
Parent Class
class A {
protected function parentClassMethod() {
echo "Something here" // This will work
$this->_someVariable = 'someValue'; // This will not
}
}
I'm having a feeling this is probably the wrong way of doing this since it doesn't work, so any help would be great.