Editor PHP 2.4.0

AsEventListener
in package

Service tag to autoconfigure event listeners.

Tags
author

Alexander M. Turek me@derrabus.de

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

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


        
On this page

Search results