code: public function subscribe($eventName, $callable, $priority = 0)
      {
          unset($this->sorted[$eventName]);           // clear the sorted cache
          $this->subscribers[$eventName][$priority][] = $callable;
      }
docs: Subscribe to event
  
  @param string   $eventName event name
  @param callable $callable  callable
  @param integer  $priority  The higher this value, the earlier we handle event
  
  @return void