I work on a multilingual website that its owner requires most configurations / parameters - which must be set first - for storage in a database, for example:
- default language
- default action
- default theme
- etc...
I am confused where to request this config (since I'm still in the logic of the MVC approach).
- Request configuration directly from the configuration file? (Is it possible to query a database from a non-model file / class?)
- Create a class file that applies to all configuration sets in the / core directory, for example: language.php, theme.php and the query database in these files?
- Use models only to request these configurations?
- If you are using models, should I access them directly from the configuration file or use the controller to access them? (If I understand correctly, the controller is just the environment between views and models?).
- Other offers...?
The root of the application contains the following:
- backend
- core
- Lib
- Models
- configuration
- view
- Controllers
- Assistants
- Handlers
- front end
source share