REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.66 KB
Close
//opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/evenement/evenement/README.md
Text
Base64
# Événement Événement is a very simple event dispatching library for PHP. It has the same design goals as [Silex](https://silex.symfony.com/) and [Pimple](https://github.com/silexphp/Pimple), to empower the user while staying concise and simple. It is very strongly inspired by the [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) API found in [node.js](http://nodejs.org).  [](https://packagist.org/packages/evenement/evenement) [](https://packagist.org/packages/evenement/evenement/stats) [](https://packagist.org/packages/evenement/evenement) ## Fetch The recommended way to install Événement is [through composer](http://getcomposer.org). By running the following command: $ composer require evenement/evenement ## Usage ### Creating an Emitter ```php <?php $emitter = new Evenement\EventEmitter(); ``` ### Adding Listeners ```php <?php $emitter->on('user.created', function (User $user) use ($logger) { $logger->log(sprintf("User '%s' was created.", $user->getLogin())); }); ``` ### Removing Listeners ```php <?php $emitter->removeListener('user.created', function (User $user) use ($logger) { $logger->log(sprintf("User '%s' was created.", $user->getLogin())); }); ``` ### Emitting Events ```php <?php $emitter->emit('user.created', [$user]); ``` Tests ----- $ ./vendor/bin/phpunit License ------- MIT, see LICENSE.
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
src
DIR
-
drwxr-xr-x
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
composer.json
759 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.03 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
1.66 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).