This may be a dumb question, but I have to ask:
I have a large group of related functions for the project that I am doing. Functions must have access to several global variables, so I thought about putting them into a class and loading the class as needed. I suppose my other option is to simply include them as unrelated functions in the included PHP file, but apparently their meaning is in 1 class. Is this an acceptable practice? I worked with people who did this, but it always seemed like it wasn’t in the spirit of good OOP methods, because classes were almost never created, but functions were still being called. Or maybe I already thought about it.
Any entry would be awesome thanks to the bunch.
source
share