PHPackages                             vestin/hook - 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. vestin/hook

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

vestin/hook
===========

php hook library

1.0(9y ago)0111MITPHP

Since Apr 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Vestin/Hook)[ Packagist](https://packagist.org/packages/vestin/hook)[ RSS](/packages/vestin-hook/feed)WikiDiscussions master Synced 2mo ago

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

Hook
----

[](#hook)

Hook library inspired by

- [ryanhs/hook](https://github.com/ryanhs/hook)
- [Thinkphp Hook](https://github.com/top-think/thinkphp/blob/master/ThinkPHP/Library/Think/Hook.class.php)

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

[](#installation)

```
composer require vestin/hook

```

Example

```
namespace App;
use Vestin\Hook\Target;
class DoneTarget implement Target{
    public function exec(){
        echo 'bye';
    }
}

```

```
require 'vendor/autoload.php';
use Vestin\Hook\Hook;

Hook::on('init', function(){ echo 'hello'; });
Hook::on('done', 'App\DoneTarget');
/*
 * other code you need
*/
Hook::call('init'); // see 'hello';
Hook::call('done'); // see 'bye';
```

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3325d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc645423526b4d789381df1b6052ba2043b3b7960c94ae1166cf2763415ec497?d=identicon)[Vestin](/maintainers/Vestin)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vestin-hook/health.svg)

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

###  Alternatives

[spatie/laravel-package-tools

Tools for creating Laravel packages

935125.5M7.0k](/packages/spatie-laravel-package-tools)[istvan-ujjmeszaros/bootstrap-duallistbox

A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.

628199.4k2](/packages/istvan-ujjmeszaros-bootstrap-duallistbox)[wikimedia/aho-corasick

An implementation of the Aho-Corasick string matching algorithm.

573.5M3](/packages/wikimedia-aho-corasick)[sroze/tolerance

Fault tolerance library and micro-services helpers

1982.5k](/packages/sroze-tolerance)[humanmade/meta-tags

Meta tag generator for Opengraph, Twitter &amp; JSON+LD

1052.2k](/packages/humanmade-meta-tags)

PHPackages © 2026

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