Download the PHP package scones/nexus without Composer
On this page you can find all versions of the php package scones/nexus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor scones
Package nexus
Short Description implementation for the upcoming PSR-14 standard. currently supporting 0.6.0
License MIT
Homepage https://github.com/scones/nexus
Package nexus
Short Description implementation for the upcoming PSR-14 standard. currently supporting 0.6.0
License MIT
Homepage https://github.com/scones/nexus
Please rate this library. Is it a good library?
Informations about the package nexus
Nexus
psr-14 event dispatcher implementation
(honoring psr-12)
Install
In most cases it should suffice to just install it via composer.
composer require scones/nexus "*@stable"
Usage
These exmaples are taken from the tests, so there is of course a bit of redundancy.
Messages
The usage is quite basic.
- You define a Message class.
- You provide a callable listener with one argument, which has to match the Message Type it should listen on.
- You call the notfier with an instance of the Message you wish to propagate
which would of course result in:
Tasks
Again the usage is quite simplistic.
- You define a Task class.
- You provide a callable listener with one argument, which has to match the Task Type it should listen on.
- You call the processor with an instance of the Task you wish to propagate
- After all Tasks have processed, the resulting modified task instance is returned.
which would of course result in:
All versions of nexus with dependencies
PHP Build Version
Package Version
Requires
php Version
~7.2
psr/event-dispatcher Version ^0.6.0, <1.0.0
psr/event-dispatcher-message Version ^0.6.0
psr/event-dispatcher-task Version ^0.6.0
psr/event-dispatcher Version ^0.6.0, <1.0.0
psr/event-dispatcher-message Version ^0.6.0
psr/event-dispatcher-task Version ^0.6.0
The package scones/nexus contains the following files
Loading the files please wait ....