php hook run functions
<p>I am thinking of building some kind of "hook" function system. Basically a couple of functions that is run before the whole application start doing what it is suppose to do. I guess some kind of authentication would be proper to have as a hook. Check if the user is still logged in etc. There should also be some kind of priority order.</p>

<p>But how do I structure this kind of hook system? How do I initialize it?</p>

<p>I guess I would need some class to handle this for me. An add_hook and run_hooks method or something.</p>
