动作引擎的结构

I am working on a project that requires a basic Actions engine so that certain functions can be bound to certain events, and other functions can call certain events. Just like the Wordpress Hooks system (except without the filters).

I know I could copy the Wordpress one, but I want to get some clarification on a thought. This project will grow quite large, and at the moment, will contain around 1200 events and over 2000 callbacks to be bound to those events, and those figures will only grow. So, would it be best to (in terms of performance):

A)

Have a single class with static functions/a set of functions on their own which will act as the repository for all these bindings, and is the sole interface for this functionality

B)

To build a class containing the functions, but when applications want to Bind a function, or Call an event, they need to access (probably contained within a global registry, havent decided yet) the instantiated Event object that contains specific Events, as per which instance is used.

So, my question is, would B be more performant (by dividing up the events into smaller groups), or would A be sufficient in this case?

Well, there is more than one thing to consider in this two strategies.

A) For what I have understood will have best performance over B if you use some array structure in B to find the events, but will be over more complex to maintain and scale, since you gonna need to write everithing in a class that gonna be huge

B) may become less performatic but easier to use and scale as a event engine.

I believe the best choice to implement would be to use B as a kind of Event Dispatcher Pattern. Look this gist https://gist.github.com/nunomazer/8472389, the code is from this article http://www.cainsvault.com/design-pattern-php-event-dispatcher/. It implements a simple event manager based on Observer Pattern.

But if I were use an event manager, probably I would consider one from a framework, like Symfony Event Dispatcher component that is ready and allow you to use it as a library in your project.