PHPackages                             pentagonal/hookable - 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. pentagonal/hookable

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

pentagonal/hookable
===================

Hook able Library like a WordPress uses

1.0(9y ago)13134GPL-3.0+PHP &gt;=5.3

Since Nov 27Compare

[ Source](https://github.com/pentagonal/Hookable)[ Packagist](https://packagist.org/packages/pentagonal/hookable)[ Docs](https://www.pentagonal.org/)[ RSS](/packages/pentagonal-hookable/feed)WikiDiscussions Synced 2d ago

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

Hookable
========

[](#hookable)

Hook able Library like a WordPress uses

[![Build Status](https://camo.githubusercontent.com/6eb033349cedd3f77b6bfa7147710fef3f3b1431fbc7c09b8223de10eb197717/68747470733a2f2f7472617669732d63692e6f72672f70656e7461676f6e616c2f486f6f6b61626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pentagonal/Hookable)[![Latest Stable Version](https://camo.githubusercontent.com/dde372c23d01b610d5851699adb2a673b23a3cd00448b1fdff82a265958ce425/68747470733a2f2f706f7365722e707567782e6f72672f70656e7461676f6e616c2f686f6f6b61626c652f762f737461626c65)](https://packagist.org/packages/pentagonal/hookable)[![License](https://camo.githubusercontent.com/5f10f3291a5c1ad9c2166681aa2093f7731b00021a3c875e250749537cebe373/68747470733a2f2f706f7365722e707567782e6f72672f70656e7461676f6e616c2f686f6f6b61626c652f6c6963656e7365)](https://packagist.org/packages/pentagonal/hookable)[![Total Downloads](https://camo.githubusercontent.com/1174ac2503778cad661165671c4cc3c08b12b71d4b3deb360fe878aad7e6b1a4/68747470733a2f2f706f7365722e707567782e6f72672f70656e7461676f6e616c2f686f6f6b61626c652f646f776e6c6f616473)](https://packagist.org/packages/pentagonal/hookable)

### Usage

[](#usage)

```
$hook = new \Pentagonal\Hookable\Hookable();

/**
 * Add Hook into functions example
 */
function thIsIsOnHookReturn()
{
    global $hooks;
    /**
     * .... run the code
     */
    $the_result = array('array_result'); // the returning result
    return $hook->apply('callback_name', $the_result);
}

/**
 * in here
 * Calling thIsIsOnHookReturn()
 * will be returning array
 */
var_dump(thIsIsOnHookReturn());

/**
 * add filter / action on determined callback
 */
$hook->add(
    'callback_name', // the callback
    function ($returning_old_result) {
        $new_result = print_r($returning_result, true);
        return $new_result;
    },
    10, // priority
    1 // arguments accepted
);

/**
 * in here
 * Calling thIsIsOnHookReturn()
 * will be returning string of array printed
 */
var_dump(thIsIsOnHookReturn());
```

### Install

[](#install)

```
{
   "require": {
       "pentagonal/hookable": "^1"
   }
}
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

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

3503d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

wordpressutilitylibraryhooksmodule

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pentagonal-hookable/health.svg)

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

###  Alternatives

[maiorano84/shortcodes

Implement Shortcode syntax anywhere

7766.0k5](/packages/maiorano84-shortcodes)[tajawal/lodash-php

A full-on PHP manipulation utility-belt that provides support for the usual functional.

232.6k1](/packages/tajawal-lodash-php)

PHPackages © 2026

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