class Controller {...}
$ctrl = new Controller();
switch($scriptProperties['action']) {
case 'do':
return $ctrl->doSomething();
break;
...
}
This question has been answered by roman.khazizov. See the first response.
return Controller::doSomething();
This may not be possible, depending on what the controller does, because you can't use $this to access class variables in a static method.
public static function getInstance()
{
if (null === static::$instance) {
static::$instance = new static();
}
return static::$instance;
}