/** * {@inheritdoc} * * The listener can be a string of 'Class:method' or just 'Class'. If no * method is provided, the method 'handle' is used. */ public function addListener($name, $listener, $priority = 0) { if (is_string($listener) && !is_callable($listener)) { $listener = [$listener, 'handle']; } if (is_array($listener) && is_string($listener[0])) { list($class, $method) = $listener; $listener = function ($event) use($class, $method) { return $this->resolver->resolve($class)->{$method}($event); }; } parent::addListener($name, $listener, $priority); }