How and why use curly braces: return $this->{$this->action}();

$this->{$this->action}();
means that the method that should be called comes from the property $this->action.
$this->action = 'func1';
$this->{$this->action}();
is equivalent to:
$this->func1();

Comments

Popular Posts