PHPackages                             lifetechocms/events - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lifetechocms/events

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lifetechocms/events
===================

A lightweight Event and listener package for PHP applications.

v1.1(3mo ago)13MITPHP &gt;=8.1

Since Apr 15Compare

[ Source](https://github.com/lifetechOCMS/events)[ Packagist](https://packagist.org/packages/lifetechocms/events)[ RSS](/packages/lifetechocms-events/feed)WikiDiscussions Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

📦 LifeTechOCMS Events — Lightweight PHP Event System
====================================================

[](#-lifetechocms-events--lightweight-php-event-system)

[![PHP Version](https://camo.githubusercontent.com/6351c44c5acd541a16e8505d9389a2576fb01528ebdbaf6a6b744ac49e401cae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c7565)](https://camo.githubusercontent.com/6351c44c5acd541a16e8505d9389a2576fb01528ebdbaf6a6b744ac49e401cae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c7565)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)[![Status](https://camo.githubusercontent.com/b411594136144442e4c5e6e2e2d63ee7461762fbe5e2eb0e5abbbec3fd812845/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d73756363657373)](https://camo.githubusercontent.com/b411594136144442e4c5e6e2e2d63ee7461762fbe5e2eb0e5abbbec3fd812845/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d73756363657373)[![Maintained](https://camo.githubusercontent.com/2efb511e509940654d13d06d225b5404e9e44e47e93c518a085f78008b25d6b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65642d7965732d627269676874677265656e)](https://camo.githubusercontent.com/2efb511e509940654d13d06d225b5404e9e44e47e93c518a085f78008b25d6b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65642d7965732d627269676874677265656e)[![Packagist Version](https://camo.githubusercontent.com/416ee75d6c193435df6b0cb39d7e3860cf4b01f0bfd7c567e3d71336248e6bb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696665746563686f636d732f6576656e7473)](https://camo.githubusercontent.com/416ee75d6c193435df6b0cb39d7e3860cf4b01f0bfd7c567e3d71336248e6bb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696665746563686f636d732f6576656e7473)[![Downloads](https://camo.githubusercontent.com/82df8a0eba972bf7404250b85b147fc79d5d0aee283fcf2562cef782f340e888/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c696665746563686f636d732f6576656e7473)](https://camo.githubusercontent.com/82df8a0eba972bf7404250b85b147fc79d5d0aee283fcf2562cef782f340e888/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c696665746563686f636d732f6576656e7473)[![GitHub Stars](https://camo.githubusercontent.com/4ac83428b0a7f3aa4889699feb684a40d9c7fc83114b98b17d5b59d97e0a04b3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c696665746563686f636d732f6576656e74733f7374796c653d736f6369616c)](https://camo.githubusercontent.com/4ac83428b0a7f3aa4889699feb684a40d9c7fc83114b98b17d5b59d97e0a04b3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c696665746563686f636d732f6576656e74733f7374796c653d736f6369616c)

> A lightweight, framework-agnostic **event dispatcher system for PHP**, built for modular applications, custom frameworks, and scalable architectures.

---

🚀 Overview
==========

[](#-overview)

**LifeTechOCMS Events** is a powerful yet simple **event-driven architecture package for PHP** that allows developers to:

- create and manage events
- register listeners dynamically
- attach listeners to events
- dispatch events with payloads

Unlike traditional event systems, this package is:

- ✅ database-free (JSON storage)
- ✅ framework-independent
- ✅ easy to integrate
- ✅ production-ready

---

🔍 Why Use LifeTechOCMS Events?
==============================

[](#-why-use-lifetechocms-events)

Most PHP event systems are:

- tightly coupled to frameworks
- require service containers
- complex to configure

### LifeTechOCMS Events solves this by offering:

[](#lifetechocms-events-solves-this-by-offering)

✔ Works with any PHP framework (Laravel, Symfony, Drupal, Shopify, etc.) ✔ Zero framework dependency
✔ Simple and intuitive API
✔ File-based persistence (no DB needed)
✔ Flexible event-listener mapping
✔ Clean response structure for APIs

---

⚙️ Installation
===============

[](#️-installation)

```
composer require lifetechocms/events
```

---

📌 Quick Start
=============

[](#-quick-start)

```
use Lt\Events\LtEvent;
use Lt\Events\LtListener;
use Lt\Events\LtDispatcher;

//Event Registration
LtEvent::register('userRegistered'); //userRegistered is the eventName

//Listener Registration
//listenerName, ListenerClassPath, and ListenerClassMethod
LtListener::register(
    'sendWelcomeEmail',
    'App\Listeners\SendWelcomeEmail',
    'sendTo'
);

//to allow Event to Listen to a Listener
LtEvent::listen('userRegistered', 'sendWelcomeEmail');

//to Dispatch an Event with a payload, the payload can be array,string or object
LtDispatcher::dispatch('userRegistered', ['email' => 'user@example.com']);
```

---

Documentation
=============

[](#documentation)

- [Getting Started](docs/getting-started.md)⬅ Basic concepts
- [LtEvent API](docs/ltevent.md) ⬅ Manage events
- [LtListener API](docs/ltlistener.md) ⬅ Manage listeners.
- [LtDispatcher API](docs/ltdispatcher.md) ⬅ Dispatch events
- [Response Codes](docs/response-codes.md) ⬅ Full respomse code reference
- [Configuration](docs/configuration.md) ⬅ Storage setup(optional)
- [Architecture &amp; Storage](docs/architecture.md) ⬅ System overview
- [CONTRIBUTING](CONTRIBUTING.md) ⬅ System overview

---

✨ Key Features
==============

[](#-key-features)

- Event registration and lifecycle management
- Listener registration and execution
- Dispatcher supporting static &amp; instance methods
- JSON-based persistent storage
- Runtime configuration via EventSetting
- Framework-agnostic design

---

🎯 Use Cases
===========

[](#-use-cases)

- Event-driven PHP applications
- Custom MVC frameworks
- Plugin/module systems
- Notification systems
- Logging and auditing systems
- Decoupled business logic

---

🔁 Response Format
=================

[](#-response-format)

Set Response output to either Array or Json

```
use Lt\Events\EventSetting;
EventSetting::set('responseType','json'); //json or array
```

See more [Available Response Codes](docs/response-codes.md)
-----------------------------------------------------------

[](#see-more-available-response-codes)

🔒 Security Best Practices
=========================

[](#-security-best-practices)

- store JSON files outside public web root
- validate listener classes
- restrict file permissions

---

👤 Author
========

[](#-author)

**Ajayi Abolore A. Ajayi**
Founder &amp; Lead Architect — LifeTech OCMS

---

📄 License
=========

[](#-license)

MIT License

---

⭐ Contribute
============

[](#-contribute)

- Star the repo
- Fork and contribute
- Report issues

---

🔥 SEO Keywords
==============

[](#-seo-keywords)

PHP event system, PHP dispatcher, PHP listener system, event-driven PHP, lightweight PHP events, PHP observer alternative

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance81

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

101d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/240928934?v=4)[abaj](/maintainers/abaj)[@abaj](https://github.com/abaj)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lifetechocms-events/health.svg)

```
[![Health](https://phpackages.com/badges/lifetechocms-events/health.svg)](https://phpackages.com/packages/lifetechocms-events)
```

###  Alternatives

[awps/font-awesome-php

A PHP library for Font Awesome.

4831.7k1](/packages/awps-font-awesome-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
