protected function removeListenerPattern($eventPattern, $listener)
    {
        if (!isset($this->patterns[$eventPattern])) {
            return;
        }

        foreach ($this->patterns[$eventPattern] as $key => $pattern) {
            if ($listener == $pattern->getListener()) {
                $pattern->unbind($this->dispatcher);
                unset($this->patterns[$eventPattern][$key]);
            }
        }
    }