承接 shancept/event 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

shancept/event

最新稳定版本:v1.0.2

Composer 安装命令:

composer require shancept/event

包简介

Events

README 文档

README

Events allow you to insert custom code into existing code at specific points in execution. You can attach custom code to an event so that when the event fires, the code is automatically executed.

install:

composer require shancept/event

Usage:

first case

  1. create event class implements EventInterface. Example.
  2. create event handler class. Example.
  3. call trigger event at the right place Event::trigger(new Event()).
  4. subscribe to the event before executing it Event::listen(SomeClass::class, static function ($event) {}).

second case

  1. use trait in your class.
  2. record all events via EventTrait::recordEvent.
  3. call in the right place: EventBus::dispatch().
  4. pass EventTrait::releaseEvents result to the "dispatch" function parameter.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-11-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固