[eluser]jorgeguberte[/eluser]
Hello.
Yesterday i tried to declare some variables using the __construct() approach, but as soon as i did it, everything else stopped working.
What can i do to have variables that are accesible through the Class' scope?
--edit--
Poking around i found a solution (yes, i should try more things before posting a topic).
Code:
class Neptune extends Controller{
private $variable = 'value';
function function_here(){
echo $variable //it works.
}
//everything else
}
I don't know if this is the best approach, but as long as it works, i'm game.