PHPackages                             jersoncarin/jershooks - 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. jersoncarin/jershooks

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

jersoncarin/jershooks
=====================

A lightweight Hooking API inspired by wordpress

1.0.0(5y ago)110MITPHPPHP ^8.0

Since Jan 16Pushed 5y ago2 watchersCompare

[ Source](https://github.com/jersoncarin/hooks)[ Packagist](https://packagist.org/packages/jersoncarin/jershooks)[ RSS](/packages/jersoncarin-jershooks/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Jers Hooks API for PHP
======================

[](#jers-hooks-api-for-php)

JersHooks is a hooking system which inspired by wordpress hooking api

- apply\_filters
- add\_filter
- remove\_filter
- add\_action
- do\_action
- remove\_action

Requirements
============

[](#requirements)

- PHP 8.0+

Installation
============

[](#installation)

```
composer require jersoncarin/jershooks
```

How to use
==========

[](#how-to-use)

```
$hooks = new \Jersnet\Framework\Hook\Hooks;

// adding action to the hooks
// Note: it can be a closure, a function and a class method
// add_action(string $tag,mixed $object,int $priority,int $args_limit)
$hooks->add_action('action_name',function(){
    // some code
});

// Firing an action
// do_action(string $tag,...$args);
// you can pass as many as you can arguments
$hooks->do_action('action_name');

// Removing an action
// remove_action(string $tag,callable $callable,int $priority = 10)
// Third argument is optional
$hooks->remove_action('action_name','some_function');

// Has action(s)
// Returns boolean
$hooks->has_action('action_name','some_function');
$hooks->has_actions();

// adding filter to the hooks
// Note: it can be a closure, a function and a class method
// add_filter(string $tag,mixed $object,int $priority,int $args_limit)
$hooks->add_filter('filter_name',function($arg){
    // some code
});

// Removing an filter
// remove_filter(string $tag,callable $callable,int $priority = 10)
// Third argument is optional
$hooks->remove_filter('filter_name','some_function');

// Has filter(s)
// Returns boolean
$hooks->has_filter('action_name','some_function');
$hooks->has_filters();

// Applying Filters
// Apply filters to a hook
// apply_filters(string $tag,mixed $value,mixed ...$args)
// Return mixed
$hooks->apply_filters('filter_name','some_filter','extra_filer');
```

Author
======

[](#author)

- Jerson Carin

License
=======

[](#license)

- MIT License

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

1995d ago

### Community

Maintainers

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

---

Top Contributors

[![jersoncarin](https://avatars.githubusercontent.com/u/63774442?v=4)](https://github.com/jersoncarin "jersoncarin (13 commits)")

### Embed Badge

![Health badge](/badges/jersoncarin-jershooks/health.svg)

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

###  Alternatives

[mpociot/documentarian

3783.4M31](/packages/mpociot-documentarian)[glifery/entity-hidden-type-bundle

Hidden field for Symfony2 entities

19136.9k](/packages/glifery-entity-hidden-type-bundle)[llm/skills

AI skills discovery and management system for LLM agents

2812.3k6](/packages/llm-skills)

PHPackages © 2026

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