Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Should there be a SharedLazyListenerAggregate? #49

@davidwindell

Description

@davidwindell

Is there a reason there isn't a Lazy Aggregate for attaching listeners to the Shared Event Manager?

Something like:

class SharedLazyListenerAggregate
{
    ...

    public function attachShared(SharedEventManagerInterface $manager, $priority = 1)
    {
        foreach ($this->lazyListeners as $lazyListener) {
            $this->listeners[] = $manager->attach(
                '*',
                $lazyListener->getEvent(),
                $lazyListener,
                $lazyListener->getPriority($priority)
            );
        }
    }

Ping @bakura10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions