i got this error : Warning: call_user_func_array() expects exactly 2 parameters, 3 given in

call_user_func_array($this->controller, $this->method, $this->params);

This call is wrong, check this example on the official PHP documentation. Your code should be the following instead: (using array syntax for class methods).

call_user_func_array([$this->controller, $this->method], $this->params);
//                   ^                                ^