I have a problem to load dinamic configs in static class.
I have something like this:
class ololo {
public static $config = array(
'time' => time(),
'name' => 'zztop_'.mt_rand(1,1000)
);
public static function getVar($name) {
return self::$config[$name];
}
}
How should i do to make it work? I have many dynamic vars and i cant load it in __construct.
I want everytime i call a getVar have new value to show. Something like:
echo ololo::getVar('name');
echo ololo::getVar('name');
echo ololo::getVar('name');
zztop_1
zztop_222
zztop_11