Download the PHP package buonaparte/bnp-lazy-listener without Composer

On this page you can find all versions of the php package buonaparte/bnp-lazy-listener. 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 bnp-lazy-listener

BnpLazyListener

Build Status Coverage Status Latest Stable Version Latest Unstable Version

This library allows you to attach Lazy Listeners to a ZF2 EventManager.

Installation

Setup

  1. Add this project to your composer.json:

  2. Now tell composer to download BnpServiceDefinition by running the command:

!!! Notice this is not a Module, so you do not have to enable it in a ZF2 Application, moreover, you can use it with the EventManager decoupled component.

LazyListenerAggregate

There are many cases when instantiating a listener aggregate may be too expensive, especially when that listener will be never triggered, LazyListenerAggregate makes it possible to define a factory for your real listener, as well as specifications for which events the future listener is subscribed, LazyListenerAggregate will then instantiate your listener when the first of subscribed is being triggered.

Now you can attach this PPO to the EventManager:

We've used \Closure here as factory, LazyListenerAggregate however, accepts any valid callable. As you can already see this does not bring much flexibility, as we wrap statically all our listener dependencies, here is where the second utility listener comes in handy.

ServicesListenerAggregateCollection

This is a ServiceLocatorAware service that is able to aggregate a collection of other ListenerAggregates, from which, the most important one is that described above. All atom listeners are called delegates and can be represented as:

We can now define a bunch of listeners at a time using only a configuration array:


All versions of bnp-lazy-listener with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
zendframework/zend-servicemanager Version 2.*
zendframework/zend-eventmanager Version 2.*
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 buonaparte/bnp-lazy-listener contains the following files

Loading the files please wait ....