I need to implement a hook/plugin architecture for a project in PHP. I found a lot of articles and examples written in php and some information on plugin architecture, but I still cannot clearly understand how this works. This may be a real stupid question to someone, but I am new to these concepts and really need to find a clear answer. What is really the role of a hook in plugin architecture? How does hooks can make an application more extensible. I'd love to see a answer with an example from PHP.
Thank you.