All my PHP files conform to class.className.php as a naming conventoin. So I put all my definitions in a class called class.Configure.php like below. Is there a best practice way to put this in an acutal class. Consistency makes it easier for me to manage my code.
This is the only “loose” code I have in my library.
I guess the actual question is should I put this code in a class? I would like to unless I’m breaking some sort of best practice.
Also in C++ the preprocessor comes through and replaces all you #defines with the actual values before compilation. So I atleast undertand the concept of definitions in C++..they are simple text substitutions before compilation.
Is it the sameway in PHP?
Use PHP’s class constantsdocs: