code: protected function subscribe($event, $observer, $handler = FALSE)
      {
          if (!isset($this->event_listeners[$event])) {
              $this->event_listeners[$event] = array();
          }
  
          if (is_string($handler) || (is_string($observer) && !$handler)) {
              $handler = !$handler ? $observer : $handler;
              $this->event_listeners[$event][$handler] = $observer;
              return $this;
          }
  
          $strategy = $handler ? 'array_unshift' : 'array_push';
  
          $strategy($this->event_listeners[$event], $observer);
  
          return $this;
      }
docs: /*---------------------------
  Event Callback functions
  ---------------------------