Initially, I intend to create a class (Object oriented) to save the settings as permanent. For example, in PHP:
class Settings{
const test = 'foobar!';
}
But later I think that this approach does not allow the admin user to change these parameters. It seems that only the parameters optional for the change should be declared as constant, while others should be declared as private variables, then the application will detect whether the parameters will be available in the database. First set the parameter table, and if not, it will be used by default from the get (), set () function defined in the settings class. Is this a good approach? What is the best approach? I appreciate any advice on this issue.
source
share