Calling a method of an object of a child.
I have two classes, Abba and Baka.
Baka extends Abba. Abba contains a list of arrays (empty on instantiation).
Baka has a method which adds to these arrays. Each array added has:
String: Identifier (just a name)
Object: Reference
String: Name of Function in the above object.
I'd like to be able to call that object's function from Abba by doing something like the following:
PHP Code:
//Assume $caldera is one of those
//arrays I mentioned.
//$args is an array of arguments.
call_user_func_array(array(&$this->$caldera[1], $caldera[2]), $args);
Since $caldera is an object contained in the child, I should be able to reference it by &$this-> ... but I get the following error:
Warning: call_user_func_array(): First argumented is expected to be a valid callback, 'Array' was given in C:\sambar62\docs\Foo\Foo.php on line 145
Any ideas?