dhii/event-dispatcher-interface
Composer 安装命令:
composer require dhii/event-dispatcher-interface
包简介
Standard interfaces for event handling.
README 文档
README
Enhancements to PSR-14.
Details
This is a fork of the original event-dispatcher PSR package. The aim was to make it compatible with PHP 7.0, but now this package has evolved and is instead aimed to enhance the interfaces of PSR-14, which this package is fully compatible with.
Enhancements
The following interfaces extend the existing PSR-14 spec in order to provide interop for working with name-based events, e.g. in event models where an event is identified by its name rather than class, such as in WordPress.
AddListenerCapableInterfaceallows adding a listener to an event identified by name, with priority.RemoveListenerCapableInterfaceallows removing a listener by name and priority.
Shadows
The interfaces that simply shadow PSR-14 interfaces without changing anything are deprecated, namely:
EventDispatcherInterface;IsPropagationStoppedCapableInterface;ListenerProviderInterface.
These will likely be removed in a future version, because they are redundant due to the new PHP 7.2 requirement allowing all the features of PSR-14. They are kept here in order to avoid breaking dependants that use them.
统计信息
- 总下载量: 21.76k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-10