Image

Imagegamesociety wrote in Imagephp

Totally perplexed..

Has anyone else ever had this happen when calling an object dynamically (meaning you get $var as a string then do new $var()

The parent completely and totally ignores calls from the child?!?!?!

Child snippet:
function getProductList($attributes) {
		//var_dump(get_parent_class($this));exit;
		return parent::getProductList($attributes);
	}


Parent snippet:
function getProductList($attributes = false) {
		echo "break here";exit;
		global $dbs;

		//var_dump($...


I can get anything I want from the child function, nothing from the parent. The commented line above giving me the parent class shows the correct value. I mean, if the parent wasn't loaded, I'd get an error right? It extends the parent class, etc. So why can I not get anything from the parent object????

I've never had this happen and am totally perplexed. Or going insane. Perhaps I broke PHP's already weak OO structure??? Anyone ever had this happen before?


I'm an ultra goober. Had an extra bracket at the end of a function (and missing one later) that basically ended the class before that method. Duh.