1
I am reading a code and it appears with the following line
$this->controlador = new HomeController();
$this->controlador = new $this->controlador( $this->parametros )
My question is as follows, if this code is right and what it means because I have never heard that objects can be instantiated
class HomeController extends MainController
{
/**
* Carrega a página "/views/home/home-view.php"
*/
public function index() {
// Título da página
$this->title = 'Home';
// Parametros da função
$parametros = ( func_num_args() >= 1 ) ? func_get_arg(0) : array();
Related: Difference between Object and Instance
– rray