protected function subscribe(Metadata $metadata) { foreach ($metadata->getEvents() as $event => $methods) { foreach ($methods as $method) { $this->events->on($metadata->getEventPrefix() . '.' . $event, [$metadata->getClass(), $method]); } } }