My question is very simple, I saw this code in a class:
class controller_activity {
function __construct($args) {
//the variable template is not defined or what happen??
$this->template = new Template('activity');
}
.......
Usually I see the declaration of variables in a class like "public $template" or similar, but this case, is the same that if I define those variables as usual?, can I add variables in this way directly?, without defining them before?, is it recomendable?