承接 objective-php/events-handler 相关项目开发

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

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

objective-php/events-handler

最新稳定版本:v3.1.0

Composer 安装命令:

composer require objective-php/events-handler

包简介

Events Handler for ObjectivePHP

README 文档

README

Library topic

Simple events handler meant to work together with our objective-php/matcher.

It allows to bind events using patterns as defined in Matcher documentation (using wildcards and alternatives...)

Concept

Nothing really new here from the events handling point of view. The real specific feature is more related to the way the callbacks are bound to events, thanks to Matcher.

Usage

Callback binding

Binding a callback to an event is quite straight forward:

$eventsHandler = new EventsHandler();
$eventsHandler->bind('event.name', function($event) { 
    echo 'Event ' . $event->getName() . ' was just fired!');
    }
  );

Event triggering

Once again, this is very simple:

$eventsHandler->trigger('event.name'); // will echo 'Event event.name was just fired!'

More documentation to come soon!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-05-19