src/EventDispatch/Dispatcher.php
public function subscribe($eventName, $callable, $priority = 0)
    {
        if (!is_callable($callable)) {
            throw new SubscriberNotCallable();
        }

        $this->eventList[$eventName][$priority][] = $callable;

        /*
         * Clear cached sorted array
         */
        unset($this->sorted[$eventName]);

        return $this;
    }
public function subscribe($eventName, $callable, $priority = 0)
    {
        if (!is_callable($callable)) {
            throw new SubscriberNotCallable();
        }

        $this->eventList[$eventName][$priority][] = $callable;

        /*
         * Clear cached sorted array
         */
        unset($this->sorted[$eventName]);

        return $this;
    }
public function subscribe ( $ eventName , $ callable , $ priority = 0 ) { if ( ! is_callable ( $ callable ) ) { throw new SubscriberNotCallable ( ) ; } $ this -> eventList [ $ eventName ] [ $ priority ] [ ] = $ callable ; /*
         * Clear cached sorted array
         */ unset ( $ this -> sorted [ $ eventName ] ) ; return $ this ; }
Subscribe to an Event with either a closure or callable structure

@param     $eventName
@param     $callable
@param int $priority - highest number highest priority

@return $this
@throws \EventDispatch\Exception\SubscriberNotCallable
Subscribe to an Event with either a closure or callable structure