Discuss Function called before all class functions. in the Software Design forum on Dev Shed. Function called before all class functions. Software design forum discussing design principles and non-language specific algorithms. Get help with logic, algebraic, or relational concepts.
Posts: 681
Time spent in forums: 5 Days 23 h 8 m 5 sec
Reputation Power: 199
Function called before all class functions.
Hey everyone. In the CMS I've built I have an abstract class that is the parent to all the classes of the modules of my cms. So for example I have functions like this in it...
What I want to do now is add an extra level of security. I want all the functions in the abstract class to run function checkSecurityLevel at the begining, or before they're called or something along those lines. I was probably, and will probably just call that function manually first thing in all the functions, but was wondering if there was a better way to do this using some technique I'm unaware of.
To sum it up, I want function checkSecurityLevel top be called prior to any function in my abstract doing anything.