承接 mulertech/event-manager 相关项目开发

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

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

mulertech/event-manager

最新稳定版本:v1.0.0

Composer 安装命令:

composer require mulertech/event-manager

包简介

This package manage events in your application

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub PHPStan Action Status GitHub Security Action Status Total Downloads Test Coverage

The MulerTech EventManager package is a simple event manager that allows you to register and trigger events in your PHP application.

Installation

  1. Add to your "composer.json" file into require section:
"muler/event-manager": "^1.0"

and run the command:

php composer.phar update
  1. Run the command:
php composer.phar require muler/event-manager "^1.0"

Usage


Registering an event
use Muler\EventManager\EventManager;

$eventManager = new EventManager();

$eventManager->addListener(new Listener());

// Into the class that calls the event
$eventManager->dispatch(new Event());
Creating a listener
use Muler\EventManager\ListenerInterface;

class Listener implements ListenerInterface
{
    public function handle(Event $event)
    {
        // Do something
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-29