AsEventListener
    
            
            in package
            
        
    
    
    
Service tag to autoconfigure event listeners.
Tags
Attributes
- #[Attribute]
 - \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE
 
Table of Contents
Properties
- $dispatcher : string|null
 - $event : string|null
 - $method : string|null
 - $priority : int
 
Methods
- __construct() : mixed
 
Properties
$dispatcher
    public
        string|null
    $dispatcher
     = null
    
    
    
    
$event
    public
        string|null
    $event
     = null
    
    
    
    
$method
    public
        string|null
    $method
     = null
    
    
    
    
$priority
    public
        int
    $priority
     = 0
    
    
    
    
Methods
__construct()
    public
                    __construct([string|null $event = null ][, string|null $method = null ][, int $priority = 0 ][, string|null $dispatcher = null ]) : mixed
    Parameters
- $event : string|null = null
 - 
                    
The event name to listen to
 - $method : string|null = null
 - 
                    
The method to run when the listened event is triggered
 - $priority : int = 0
 - 
                    
The priority of this listener if several are declared for the same event
 - $dispatcher : string|null = null
 - 
                    
The service id of the event dispatcher to listen to