定制 symnedi/event-dispatcher 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

symnedi/event-dispatcher

最新稳定版本:v0.4.0

Composer 安装命令:

composer require symnedi/event-dispatcher

包简介

Symfony\EventDispatcher integration to Nette.

README 文档

README

Build Status Quality Score Code Coverage Downloads Latest stable

Integration of Symfony\EventDispatcher into Nette\DI.

Install

$ composer require symnedi/event-dispatcher

Register the extension in config.neon:

extensions:
	- Symnedi\EventDispatcher\DI\EventDispatcherExtension

Usage

There are 3 important parts using EventDispatcher:

  • Event
  • EventSubscriber
  • EventDispatcher

Event is value object, it simply stores data we use - e.g. user email and password.

EventSubscriber listens to certain event and invokes some action, when that happens - when user logs in.

EventDispatcher invokes the event in the place where it happens - in the login form just after the login method.

To see the real code in practise, there is example section with both Event and EventSubscriber.

Also you can find AppEvents.php that basically lists all used events. It's not necessary for the starters, just convenient in huge applications.

For more details, check Symfony documentation, or this very nice presentation with real-life examples.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

统计信息

  • 总下载量: 128.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-01