public function attachTrigger(TriggerInterface $trigger, $eventNameOrClass, $priority = 1)
    {
        $event = ltrim((string) $eventNameOrClass, '\\');

        $this->events[$event][(int) $priority . '.0'][] = $trigger;

        return $this;
    }