Class LazyEventListener

Summary

Fully Qualified Name: Zend\EventManager\LazyEventListener
Extends: LazyListener

Description

Lazy listener instance for use with LazyListenerAggregate.

Used as an internal class for the LazyAggregate to allow lazy creation of listeners via a dependency injection container.

Lazy event listener definitions add the following members to what the LazyListener accepts:

Methods

Name Description Defined By
__construct() LazyEventListener
__invoke() Use the listener as an invokable, allowing direct attachment to an event manager. LazyListener
getEvent() LazyEventListener
getPriority() LazyEventListener

Method Details

__construct()

Parameter Name Type Description
$definition array
$container \ContainerInterface
$env array

Returns:

__invoke()

Use the listener as an invokable, allowing direct attachment to an event manager.

Parameter Name Type Description
$event \EventInterface

Returns: callable

getEvent()

Returns: string

getPriority()

Parameter Name Type Description
$default

Returns: int

Top