objective-php/events-handler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

objective-php/events-handler

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!

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固