Download the PHP package fastd/event without Composer

On this page you can find all versions of the php package fastd/event. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package event

FastD Event - PSR-14 Event Dispatcher Implementation

FastD Event 是一个轻量级、高性能的 PSR-14 兼容事件调度器实现,提供简单易用的事件驱动架构解决方案。

环境要求

特性

安装

使用 Composer 安装:

快速开始

1. 创建事件类

2. 创建事件监听器

3. 配置并使用事件调度器

高级功能

事件优先级

您可以使用内置的优先级常量或自定义数值来控制监听器的执行顺序:

继承和接口支持

监听器可以监听基类或接口事件,子类事件会自动触发相应的监听器:

可停止事件

使用 StoppableEvent 类可以让事件在特定条件下停止传播:

架构组件

EventDispatcher

实现 Psr\EventDispatcher\EventDispatcherInterface 接口,负责调度事件并执行监听器。

ListenerProvider

实现 Psr\EventDispatcher\ListenerProviderInterface 接口,负责管理事件与监听器的映射关系,并支持优先级排序。

StoppableEvent

实现 Psr\EventDispatcher\StoppableEventInterface 接口,提供事件传播停止功能。

EventListenerInterface

提供标准化的事件监听器实现接口,允许开发者创建更规范的监听器类:

异常处理

当监听器抛出异常时,事件调度器会捕获异常并将其存储在支持异常处理的事件对象中(继承自StoppableEvent):

EventPriority

提供预定义的事件优先级常量,方便管理监听器执行顺序.

测试

运行单元测试:

协程调度器

FastD Event 提供了协程调度器 CoroutineEventDispatcher,支持异步事件处理:

协程调度器允许您在事件监听器中使用 yield 关键字实现异步操作,同时保持与PSR-14标准的兼容性(通过提供独立的协程调度器而非修改标准接口)。

许可证

MIT License


All versions of event with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
psr/event-dispatcher Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fastd/event contains the following files

Loading the files please wait ...