New to OOP in PHP
One of my functions requires another function to be executed before running. Is there a way I can check this?
The other function (the one, which should be called first) will manipulate some state, thats why the second function needs to know about that state. I don't know about a php builtin for that but I would eventually create another function, which returns information about that state, e.g. isReadyToRunSomething, isValid, hasConnection .. or whatever .. then use this function in the beginning of the second function, to see whether it is allowed to run.