Download the PHP package settermjd/mezzio-eventmanager-integration without Composer

On this page you can find all versions of the php package settermjd/mezzio-eventmanager-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mezzio-eventmanager-integration

Mezzio / Laminas EventManager Integration

This project provides a simplistic way of integrating laminas-eventmanager with Mezzio projects that are (originally) scaffolded with the Mezzio Skeleton, making it almost trivial to subscribe listeners to events.

[!TIP] If you're new to Mezzio, check out Mezzio Essentials a practical, hands-on guide, which steps you through how to build an application, from start to finish.

Prerequisites

To use this project, you need the following:

Usage

To use the package with an existing Mezzio application, use Composer to add the package as a dependency to your project, as in the following example:

How to subscribe listeners to events

Then, to subscribe listeners to events, you need to do two things:

  1. Add a listeners element to the application's configuration, listing the events and the listeners that are subscribed to those events, along with the priority to subscribe them at (which is optional). There are three things to be aware of here:
    • If you don't assign a priority, a listener will be subscribed with a default priority of 1
    • Higher priority values execute earlier
    • Lower (negative) priority values execute later
  2. The listeners must be registered as services in the DI container.

There are many ways to add a listeners element to the application's configuration, but likely the simplest is to create a new file in the config/autoload directory named listeners.global.php, and in that file add a configuration similar to the example below.

Assuming the configuration above was used:

When the "add-item" event is triggered, FakeLoggerListener will execute first as it has a lower priority, then FakeNotificationListener will execute (assuming that execution isn't short-circuited).

Contributing

If you want to contribute to the project, whether you have found issues with it or just want to improve it, here's how:

Did You Find The Project Useful?

If the project was useful, and you want to say thank you and/or support its active development, here's how:

Disclaimer

No warranty expressed or implied. Software is as is.


Made with 🖤 in Bundaberg by Matthew Setter.


All versions of mezzio-eventmanager-integration with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3 || ^8.4
laminas/laminas-eventmanager Version ^3.14
psr/container Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package settermjd/mezzio-eventmanager-integration contains the following files

Loading the files please wait ....