Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 15, 2024 via composer

psr/event-dispatcher 1.0.0

Standard interfaces for event handling.
Package summary
Share
0
issues
1
license
1
MIT
Package created
27 Sep 2018
Version published
8 Jan 2019
Maintainers
3
Total deps
1
Direct deps
0
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
1 Packages, Including:
psr/event-dispatcher@1.0.0
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

0
All Dependencies CSV
β“˜ This is a list of psr/event-dispatcher 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does psr/event-dispatcher do?

The psr/event-dispatcher is a set of standard interfaces for event handling in PHP. Rather than being a standalone event dispatcher implementation, it provides interfaces which outline the necessary components an event dispatcher should contain. The event dispatcher plays an essential part in designing and managing your apps' events so that they react in response to particular user actions or system-generated events.

How do you use psr/event-dispatcher?

You utilize psr/event-dispatcher by integrating it into your event-driven PHP applications. However, it's crucial to note that as this package only contains interfaces, you'll have to provide your own implementations or use an event dispatcher which adheres to these interfaces. Here's an example of how you could potentially use it:

<?php

use Psr\EventDispatcher\StoppableEventInterface;

class YourEvent implements StoppableEventInterface
{
    private bool $stoppable;

    public function __construct(bool $stoppable = true)
    {
        $this->stoppable = $stoppable;
    }

    public function isPropagationStopped(): bool
    {
        return $this->stoppable;
    }
}

$event = new YourEvent();

// Your event dispatcher will use the $event instance.

Where are the psr/event-dispatcher docs?

The documentation for the psr/event-dispatcher package can be found at PSR-14 on the official PHP-FIG website. You'll find detailed explanations about each interface provided by this package, the event dispatcher specifications, as well as the event and speaker patterns generally used within PHP applications. Please remember to consult the documentation frequently while writing applicable codes to ensure adherence to the recommended guidelines.