Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngmy/php-observer
A PHP library to implement the observer pattern
https://github.com/ngmy/php-observer
design-pattern event event-handler event-listener library observer observer-pattern php php-library publisher pubsub subject subscriber
Last synced: about 2 months ago
JSON representation
A PHP library to implement the observer pattern
- Host: GitHub
- URL: https://github.com/ngmy/php-observer
- Owner: ngmy
- License: mit
- Created: 2021-03-19T11:02:49.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T13:08:18.000Z (over 3 years ago)
- Last Synced: 2024-11-15T23:12:32.101Z (3 months ago)
- Topics: design-pattern, event, event-handler, event-listener, library, observer, observer-pattern, php, php-library, publisher, pubsub, subject, subscriber
- Language: PHP
- Homepage:
- Size: 79.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PHP Observer
[![Latest Stable Version](https://poser.pugx.org/ngmy/observer/v)](//packagist.org/packages/ngmy/observer)
[![Total Downloads](https://poser.pugx.org/ngmy/observer/downloads)](//packagist.org/packages/ngmy/observer)
[![Latest Unstable Version](https://poser.pugx.org/ngmy/observer/v/unstable)](//packagist.org/packages/ngmy/observer)
[![License](https://poser.pugx.org/ngmy/observer/license)](//packagist.org/packages/ngmy/observer)
[![composer.lock](https://poser.pugx.org/ngmy/observer/composerlock)](//packagist.org/packages/ngmy/observer)
[![PHP CI](https://github.com/ngmy/php-observer/actions/workflows/php.yml/badge.svg)](https://github.com/ngmy/php-observer/actions/workflows/php.yml)
[![Coverage Status](https://coveralls.io/repos/github/ngmy/php-observer/badge.svg?branch=master)](https://coveralls.io/github/ngmy/php-observer?branch=master)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
[![Psalm Coverage](https://shepherd.dev/github/ngmy/php-observer/coverage.svg?)](https://shepherd.dev/github/ngmy/php-observer)
[![Psalm Level](https://shepherd.dev/github/ngmy/php-observer/level.svg?)](https://shepherd.dev/github/ngmy/php-observer)PHP Observer is a PHP library to implement the [observer pattern](https://en.wikipedia.org/wiki/Observer_pattern).
- Provides the subject and observer interfaces. This allows you to implement the concrete subject and observer classes
[![class-diagram](http://www.plantuml.com/plantuml/png/hL71hfim4BpxArQ80_I9Gw-qHP7w0Jta2mmimPMnK-yIfQhoxxLb38bxoAMSsDtPcPtnYLWwNXSjs5w1BVIMsIumAeS3Ask4a3snamF3UUr_-YRy4G2DLiHVV_I4xeQkWz9kl-I77v9P3dELniUqRk5crHWm8xx76Cjg-bsbpaC8tq7GE37OAHtKjX4d02RhqBD2LVAigEdsgq3IaqAm4BwZrNJhTPICSR7suuT0CqBG4q8PHZV90M4_Dp1yR3ifc7AOfRdWkDLFHl3NAZLLYxhZw4Lv3ZPzrbO7KuEMHF3Tci4XOsB3E_iBw3NsabWo1ieByfc3UXqgIbK4r7bMENlRfdq1uFkhCx1bHg7xvN3_XeTsdXS2-0PbP3e6wJaFyjpx7gzQhXeND4oGUba0JPvNIV7d_prCTExKPOxMioFRDihywpoLKQxfKjQlrjDrnUS2R1DaF1IAJyLkMUII6rRZ5A2Xo58G9y-_Blel)](http://www.plantuml.com/plantuml/uml/hL71hfim4BpxArQ80_I9Gw-qHP7w0Jta2mmimPMnK-yIfQhoxxLb38bxoAMSsDtPcPtnYLWwNXSjs5w1BVIMsIumAeS3Ask4a3snamF3UUr_-YRy4G2DLiHVV_I4xeQkWz9kl-I77v9P3dELniUqRk5crHWm8xx76Cjg-bsbpaC8tq7GE37OAHtKjX4d02RhqBD2LVAigEdsgq3IaqAm4BwZrNJhTPICSR7suuT0CqBG4q8PHZV90M4_Dp1yR3ifc7AOfRdWkDLFHl3NAZLLYxhZw4Lv3ZPzrbO7KuEMHF3Tci4XOsB3E_iBw3NsabWo1ieByfc3UXqgIbK4r7bMENlRfdq1uFkhCx1bHg7xvN3_XeTsdXS2-0PbP3e6wJaFyjpx7gzQhXeND4oGUba0JPvNIV7d_prCTExKPOxMioFRDihywpoLKQxfKjQlrjDrnUS2R1DaF1IAJyLkMUII6rRZ5A2Xo58G9y-_Blel)
## Requirements
PHP Observer has the following requirements:* PHP >= 7.3
## Installation
Execute the Composer `require` command:
```console
composer require ngmy/observer
```## Documentation
Please see the [API documentation](https://ngmy.github.io/php-observer/api/).## License
PHP Observer is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).