PHPackages                             affittocertificato/pushnotificationhandler - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. affittocertificato/pushnotificationhandler

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

affittocertificato/pushnotificationhandler
==========================================

Lightweight implementation for push notifications from Affitto Certificato

1.0.6(6y ago)012GPL-3.0-or-laterPHPPHP &gt;=5.6

Since Nov 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bradiporitmico/affittocertificato_pushnotifications)[ Packagist](https://packagist.org/packages/affittocertificato/pushnotificationhandler)[ Docs](https://github.com/bradiporitmico/affittocertificato_pushnotifications)[ RSS](/packages/affittocertificato-pushnotificationhandler/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Affitto Certificato Push Notification Handler Library
=====================================================

[](#affitto-certificato-push-notification-handler-library)

Simple and fast implementation for push notifications handling from [Affitto Certificato](https://www.affittocertificato.it/)

[![Latest Stable Version](https://camo.githubusercontent.com/a7fee9dff2884c5633a4360986dffdabbcc16ec45f09f17dcb13cc0ff99bdb62/68747470733a2f2f706f7365722e707567782e6f72672f6166666974746f636572746966696361746f2f707573686e6f74696669636174696f6e68616e646c65722f762f737461626c65)](https://packagist.org/packages/affittocertificato/pushnotificationhandler)[![License](https://camo.githubusercontent.com/c8702ba61080ad12e47c0e66b3412d0b4c7bce6001e3bf7951659b997e8808fc/68747470733a2f2f706f7365722e707567782e6f72672f6166666974746f636572746966696361746f2f707573686e6f74696669636174696f6e68616e646c65722f6c6963656e7365)](https://packagist.org/packages/affittocertificato/pushnotificationhandler)

Basic example
-------------

[](#basic-example)

```
require_once __DIR__.'/../src/NotificationHandler.php';

$handler = new AffittoCertificato\NotificationHandler();

// this call register to a basic event named 'sharingCurriculum'.
// In other words the method ->onCurriculum(...) is an alias to ->on('sharingCurriculum', ...)
$handler->onCurriculum(function($data){

  // do your logic with $data
  // code ...
  // code ...
  // code ...
  // code ...
});

// this call register to an event named 'eventname_not_yet_implemented'
$handler->on('eventname_not_yet_implemented', function($data){
  return "You should implement this awesome event... really";
});

// run the push notification handler logic and return results to the AffittoCertificato caller
$handler->run();

// that's it!

```

What should the callback do?
----------------------------

[](#what-should-the-callback-do)

If a callback wants to inform the caller that something has gone wrong, it **must** throw an Exception with a descriptive note in it

Here's an implementation of a simple logic in onCurriculum event:

```
$handler->onCurriculum(function($data){

  if (!isset ($data->curriculumLink))
    throw new Exception("Hey! You don't have passed me the link");

  // do some logics with curriculumLink
  // code ...
  // code ...
  // code ...
  // code ...
});

```

The callback function may return a value (not mandatory and in any desidered form \[string, object, number, ...\]) as further description for action results, if there's one it will be added as "payload" to json response and passed to AffittoCertificato caller.

```
$handler->onCurriculum(function($data){

    // do your logics
  // code ...
  // code ...
  // code ...
  // code ...

  return "Have a nice day!";

});
```

In this case the caller (Affitto Certificato) will receive the string "Have a nice day!" as a payload from the handler (you). This informations will be used as log information and for further debugging activities.

onCurriculum $data format
-------------------------

[](#oncurriculum-data-format)

The callback onCurriculum receive an object on $data parameter structured as follow:

```
$data->code; // is the code of rental listing you chose during button creation
$data->curriculumLink; // is the address that link to the tenant's curriculum
$data->userName; // Tenant's full name, such as "John Smith"

```

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6

Installation
------------

[](#installation)

The recommended way is to install the lib [through Composer](http://getcomposer.org/).

Simply run `composer require affittocertificato/pushnotificationhandler` for it to be automatically installed and included in your `composer.json`.

Now you can use the autoloader, and you will have access to the library:

```
require 'vendor/autoload.php';
```

License
-------

[](#license)

This library is released under the GPL-3.0 license

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

2354d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/519e55b4e3db712c36c60692f8d01ae83c9f6d10e9d09fb754c28792e354713a?d=identicon)[bradiporitmico](/maintainers/bradiporitmico)

---

Top Contributors

[![bradiporitmico](https://avatars.githubusercontent.com/u/9455142?v=4)](https://github.com/bradiporitmico "bradiporitmico (15 commits)")

---

Tags

pushnotificationsaffittocertificato

### Embed Badge

![Health badge](/badges/affittocertificato-pushnotificationhandler/health.svg)

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

###  Alternatives

[minishlink/web-push

Web Push library for PHP

1.9k12.0M52](/packages/minishlink-web-push)[alymosul/exponent-server-sdk-php

Server-side library for working with Expo push notifications using PHP

1541.5M14](/packages/alymosul-exponent-server-sdk-php)[ivkos/pushbullet

Push notifications to devices and browsers via Pushbullet

21862.6k2](/packages/ivkos-pushbullet)[bentools/webpush-bundle

Send push notifications through Web Push Protocol to your Symfony users.

71274.3k](/packages/bentools-webpush-bundle)[minishlink/web-push-bundle

Symfony Bundle around the WebPush library

56318.3k2](/packages/minishlink-web-push-bundle)[dmitrovskiy/ionic-push-php

ionic push notifications php sdk

215.5k1](/packages/dmitrovskiy-ionic-push-php)

PHPackages © 2026

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