PHPackages                             jeyroik/df-triggers - 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. jeyroik/df-triggers

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

jeyroik/df-triggers
===================

DF triggers

4.1.4(2y ago)0630↓50%5PHP

Since Jul 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jeyroik/df-triggers)[ Packagist](https://packagist.org/packages/jeyroik/df-triggers)[ RSS](/packages/jeyroik-df-triggers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (33)Used By (5)

[![tests](https://github.com/jeyroik/df-triggers/workflows/PHP%20Composer/badge.svg?branch=master&event=push)](https://github.com/jeyroik/df-triggers/workflows/PHP%20Composer/badge.svg?branch=master&event=push)[![codecov.io](https://camo.githubusercontent.com/6b603fcc83309f28a093ce2f13b078421f4a5e5830b991b155cfa6111ba4c603/68747470733a2f2f636f6465636f762e696f2f67682f6a6579726f696b2f64662d74726967676572732f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/6b603fcc83309f28a093ce2f13b078421f4a5e5830b991b155cfa6111ba4c603/68747470733a2f2f636f6465636f762e696f2f67682f6a6579726f696b2f64662d74726967676572732f636f7665726167652e7376673f6272616e63683d6d6173746572)[![](https://camo.githubusercontent.com/c9309cedcbda0e606211ae003d30674f62511cf8aaaa36d333ae9cc39e3ab358/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32386636323066633932613364666462336432302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/jeyroik/df-triggers/maintainability)[![Latest Stable Version](https://camo.githubusercontent.com/a15a9a20fca40bdf304cf44963483cad6c681e115d1e8cce22d06304727991a3/68747470733a2f2f706f7365722e707567782e6f72672f6a6579726f696b2f64662d74726967676572732f76)](//packagist.org/packages/jeyroik/df-triggers)[![Total Downloads](https://camo.githubusercontent.com/846539848d85ad163799470a6dddb96dc301c106c41560a61bc763f91b4aab6b/68747470733a2f2f706f7365722e707567782e6f72672f6a6579726f696b2f64662d74726967676572732f646f776e6c6f616473)](//packagist.org/packages/jeyroik/df-triggers)[![Dependents](https://camo.githubusercontent.com/07a0563f27fd847e73f07ee44e278a674c9a09753849f7f16c327008edd4d32c/68747470733a2f2f706f7365722e707567782e6f72672f6a6579726f696b2f64662d74726967676572732f646570656e64656e7473)](//packagist.org/packages/jeyroik/df-triggers)

df-trigger
==========

[](#df-trigger)

DF trigger package

Usage
=====

[](#usage)

```
// get income request with specified instance id and event name
// get instance by instance id
// @var IInstance $instance
use deflou\components\triggers\TriggerService;

$resolvedEvent = $instance->buildResolver()->resolveEvent();
$triggerService = new TriggerService();

$triggers = $triggerService->getTriggers($instance->getId(), $eventName, ['vendorName1', 'vendorName2, ...']);

foreach ($triggers as $trigger) {
    if ($triggerService->isApplicableTrigger($resolvedEvent, $trigger)) {
        $result = $trigger->getInstance(ETrigger::Operation)->buildResolver()->resolveOperation($resolvedEvent, $trigger)->run();

        if ($result->isSuccess()) {
            echo 'Success trigger #' . $trigger->getId() . ' execution';
        } else {
            echo 'Failed trigger #' . $trigger->getId() . ' execution';
        }
    }
}
```

Context usage
=============

[](#context-usage)

```
$ts = new TemplateService();
$templates = $ts->getTemplates($someRepo, new ContextTrigger([
    ContextTrigger::FIELD__PARAMS => [
        ContextTrigger::PARAM__FOR => [
            IParam::FIELD__NAME => ContextTrigger::PARAM__FOR,
            IParam::FIELD__VALUE => ETrigger::Event
        ],
        ContextTrigger::PARAM__TRIGGER => [
            IParam::FIELD__NAME => ContextTrigger::PARAM__TRIGGER,
            IParam::FIELD__VALUE => $trigger
        ]
    ]
]));
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

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

Every ~2 days

Total

32

Last Release

962d ago

Major Versions

v0.x-dev → 1.0.02023-07-04

1.3.1 → 2.0.02023-07-09

2.1.0 → 3.0.02023-07-21

v3.x-dev → 4.0.02023-09-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aaec5c4bade6ab2b5d1a0f7d97ab4e0ff2ce83937f76499b2888ad16cde5e04?d=identicon)[jeyroik](/maintainers/jeyroik)

---

Top Contributors

[![jeyroik](https://avatars.githubusercontent.com/u/6348124?v=4)](https://github.com/jeyroik "jeyroik (28 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jeyroik-df-triggers/health.svg)

```
[![Health](https://phpackages.com/badges/jeyroik-df-triggers/health.svg)](https://phpackages.com/packages/jeyroik-df-triggers)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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