LazyServiceEventListener
Decorator for an event listener to be pulled from the service container.
since |
2.0.0 |
---|---|
package |
Joomla Framework |
Methods
__construct
Constructor.
__construct(\Psr\Container\ContainerInterface container, string serviceId, string method = '') : mixed
since |
2.0.0 |
---|---|
throws |
|
Arguments
- container
\Psr\Container\ContainerInterface
The service container to load the service from when it shall be executed- serviceId
string
The ID of the service from the container to be used- method
string
The method from the service to be called if necessary. If left empty, the service must be a callable; (i.e. have an__invoke()
method on a class)
Response
mixed
__invoke
Load a service from the container to listen to an event.
__invoke(\Joomla\Event\EventInterface event) : void
since |
2.0.0 |
---|---|
throws |
|
Arguments
- event
\Joomla\Event\EventInterface
The event to process
Properties
container
The service container to load the service from
since |
2.0.0 |
---|
Type(s)
string
serviceId
The ID of the service from the container to be used
since |
2.0.0 |
---|
Type(s)
string
method
The method from the service to be called
since |
2.0.0 |
---|
Type(s)
string