Hi folks!
I'm writing a factory class that should be able to return singleton instances of a number of different types, depending on the given parameter. The method would look something like this, but the way I'm referencing the singleton's static method is obviously wrong:
public function getService($singletonClassName) {
return $singletonClassName::getInstance();
}
What would the correct syntax for such a reference look like in PHP?