Good afternoon, guys.
I do not know if my question makes much sense, but there it goes.
For example, I have a class that has several functions, and I have my Index.php
Here we go, when I load the index and I need to execute a method of a class, how do I instantiate the object of this class and execute the function according to a user action? For example, when the user clicks a button it will instantiate the object and execute a certain function.
Ex:
Class:
<?php
class usuario{
private nome;
public function getNome(){
return $this->Nome;
}
}
?>
Index:
...
$usuario = new usuario();
$usuario->getNome();
...