Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 30, 2024 via composer

symfony/event-dispatcher v7.0.2

Provides tools that allow your application components to communicate with each other by dispatching events and listening to them
Package summary
Share
0
issues
1
license
3
MIT
Package created
16 Oct 2011
Version published
27 Dec 2023
Maintainers
1
Total deps
3
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
psr/event-dispatcher@1.0.0
symfony/event-dispatcher@v7.0.2
symfony/event-dispatcher-contracts@v3.4.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of symfony/event-dispatcher 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
symfony/event-dispatcher-contractsv3.4.2-MIT
prod

Visualizations

Frequently Asked Questions

What does symfony/event-dispatcher do?

The Symfony/Event-Dispatcher is a useful tool that facilitates communication among application components through event dispatching and listening protocols. The package enables components to emit events, which can then be picked up and handled by designated listeners, effectuating efficient intra-application communication. This tool is part of the larger Symfony PHP framework, but it can be utilized independently, offering a seamless way to build a dedicated communication system in your PHP application.

How do you use symfony/event-dispatcher?

Usage of the Symfony/Event-Dispatcher requires a certain amount of basic setup. Here's a simplified example of how it can be used:

use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;

$dispatcher = new EventDispatcher();

$dispatcher->addListener('event.name', function (Event $event) {
    // your code here, which will be executed when the event is dispatched
});

// ... later in your application
$event = new Event();
$dispatcher->dispatch('event.name', $event);

In this code snippet, an event listener is registered to handle a specific type of event ('event.name'). You can place any code within the listener function that you want to be executed when the event is dispatched. Later in your application, you may need to dispatch the event. This is done using the dispatch method of the EventDispatcher object, passing in the event name and an instance of the Event.

Where are the symfony/event-dispatcher docs?

The comprehensive documentation for Symfony/Event-Dispatcher can be found on the Symfony website, available at https://symfony.com/doc/current/components/event_dispatcher.html. The documentation offers in-depth information on how to effectively use the component in various contexts. Users can also contribute to improving the package by referring to the 'Contributing' section. Issues and pull requests can be dealt with in the main Symfony repository, ensuring constant development and improvement of the package.