I have a very specific question: is the following code possible in one line? Or is there a beter way to do the same?
$key = rand(1,100);
$temp = 'GetObjects'.ucfirst($key).'Array';
$objects = $this->module->$temp();
Like this:
$objects = $this->module->'GetObjects'.ucfirst($key).'Array'();
Maybe
$objects = $this->module->{'GetObjects'.ucfirst($key).'Array'}();
or
$objects = call_user_func(array($this->module, 'GetObjects'.ucfirst($key).'Array'));