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
This package has been abandoned. Use laminas/laminas-eventmanager instead.
Generated on May 8, 2024 via composer

zendframework/zend-eventmanager 3.2.1

Trigger and listen to events within a PHP application
Package summary
Share
1
issue
1
high severity
meta
1
1
license
1
BSD-3-Clause
Package created
7 Feb 2013
Version published
25 Apr 2018
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

1

1 high severity issue

high
via: zendframework/zend-eventmanager@3.2.1
Collapse
Expand

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
zendframework/zend-eventmanager@3.2.1
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 zendframework/zend-eventmanager 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does zendframework/zend-eventmanager do?

The zendframework/zend-eventmanager is a composer package designed to handle events within a PHP application. It majorly fulfils three use cases - implementing simple subject/observer patterns, aspect-oriented designs, and event-driven architectures. This architecture allows you to attach and detach listeners to named events, both on a per-instance basis as well as via shared collections, trigger events, and interrupt the execution of event listeners.

How do you use zendframework/zend-eventmanager?

To use the zendframework/zend-eventmanager, you need to first install it via composer. Here is a simple code example showing how to use this package:

use Zend\EventManager\EventManager;

$eventManager = new EventManager();
$eventManager->attach('do', function ($e) {
    $event  = $e->getName();
    $params = $e->getParams();
    printf(
        'Handled event "%s", with parameters %s',
        $event,
        json_encode($params)
    );
});

$params = ['foo' => 'bar', 'baz' => 'bat'];
$eventManager->trigger('do', null, $params);

In the example, we first import the EventManager from zendframework. We then create a new instance and attach an event 'do' to it. We also define an event handler function to handle this event. Then we trigger the event 'do' with some parameters.

Where are the zendframework/zend-eventmanager docs?

The in-depth documentation of zendframework/zend-eventmanager can be found directly on the official Zend Framework site at https://zendframework.github.io/zend-eventmanager/. This comprehensive guide will take you through from basic usage to advanced features of the package, with clear examples and descriptions. Make sure to read them if you're planning to use this package in your project. Additionally, you can find specific information about migrating from version 2 to version 3 in the migration documentation section.