etten / symfony-events
Symfony Events for Nette Framework
v1.1.0
2016-07-18 12:35 UTC
Requires
- php: >=7.0
- kdyby/events: ^3.0
- nette/di: ^2.3
- nette/utils: ^2.3
- symfony/event-dispatcher: ^2.8
Requires (Dev)
- etten/codestyle: ^2.0
- squizlabs/php_codesniffer: ~2.6.0
This package is auto-updated.
Last update: 2024-10-10 08:09:24 UTC
README
This adds EventDispatcher Component support into your Nette Framework project.
It's an extension of Kdyby\Events.
Installation
Best way is installation via Composer.
$ composer require kdyby/events
$ composer require etten/symfony-events
Then open your app/config/config.neon
file and register following extensions:
extensions:
kdyby.events: Kdyby\Events\DI\EventsExtension
symfony.events: Etten\SymfonyEvents\EventsExtension
It's all!
Register EventSubscriberInterface
implementor
You have two options.
Just open your config file, eg. app/config/config.neon
.
a. Tagged service
service:
monolog.symfony.console.handler:
class: Symfony\Bridge\Monolog\Handler\ConsoleHandler
tags: [symfony.subscriber] # this is a magic line
b. Extension section
symfony.events:
subscribers:
- Symfony\Bridge\Monolog\Handler\ConsoleHandler