So now when we create our event listeners, e.g. load_class_controller, we can specify an event hint. In the case of that event, the hint is the class name being called, e.g. XenForo_ControllerPublic_Thread.
This clearly has benefit if you've created one event listener to extend one controller. But what about if you're extending multiple controllers?
Before XenForo 1.2 I'd simply have one code event listener per code event. So if I were extending 5 controllers I'd do so in a single code event listener method via switch / case statements.
Now we have event hints. What's the best thing to do?
One code event listener per controller and make use of event hints?
One code event listener for all my controllers and not use event hints?
This clearly has benefit if you've created one event listener to extend one controller. But what about if you're extending multiple controllers?
Before XenForo 1.2 I'd simply have one code event listener per code event. So if I were extending 5 controllers I'd do so in a single code event listener method via switch / case statements.
Now we have event hints. What's the best thing to do?
One code event listener per controller and make use of event hints?
One code event listener for all my controllers and not use event hints?
Last edited: