src/Traits/EventEmitter.php
public function bindEvent($event, $callback, $priority = 0)
    {
        $this->emitterEvents[$event][$priority][] = $callback;
        unset($this->emitterEventSorted[$event]);

        return $this;
    }
public function bindEvent($event, $callback, $priority = 0)
    {
        $this->emitterEvents[$event][$priority][] = $callback;
        unset($this->emitterEventSorted[$event]);

        return $this;
    }
Create a new event binding.

@param string $event The event name to listen for
@param callable $callback The callback to call when emitted
@param int $priority

@return static