What’s the best way to implement “global on/off switches” in OOP for certain features of your site? Like the option to turn off the ability make posts (entirely), the ability to log in or register, and so on. I used global constants for these before but this seems break some OOP design theory (which I am brand new to). It is only for a single project, though. Is it still best to use constants in a config.php file and include that file everywhere? I will need to make use of these constants (or constant like objects) in several classes, some of which are entirely unrelated to each other. I know there are class constants, but the amount of editing it would take to incorporate those into every class seems like a downgrade from just including a config.php in the header of each page…
I guess I am running into a theory wall where it seems my interpretation of the OOP way of doing things seems like the wrong way.
In a nut shell I want to know what to do about:
define("REGISTRATION_ON", 1);