Using $obj->foo() you call the methods, but you want to call the property as a function / method. This just confuses the parser because it did not find a method called foo() , but it cannot expect any property to be something called.
call_user_func($tokenMapper->tokenJoinHistories, $a);
Or do you expand your cartographer, for example
class Bar { public function __call ($name, $args) { if (isset($this->$name) && is_callable($this->$name)) { return call_user_func_array($this->$name, $args); } else { throw new Exception("Undefined method '$name'"); } } }
(There are probably some problems in this quick-written example)
source share