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

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

dsijak/hook
===========

Basically, does what WP hooks do. Without any unnecessary overcomplicated features.

v0.5.0(4y ago)04MITPHPPHP &gt;=7.0

Since Mar 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/damir-sijakovic/hook)[ Packagist](https://packagist.org/packages/dsijak/hook)[ RSS](/packages/dsijak-hook/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Dsijak Hook
===========

[](#dsijak-hook)

Basically, does what WP hooks do. Without any unnecessary overcomplicated features. You assign functions to specific key string and later when you call that key all functions are executed in order you set with priority argument.

### Install

[](#install)

```
    composer require dsijak/hook

```

### Usage

[](#usage)

#### Add functions to keyword 'alpha':

[](#add-functions-to-keyword-alpha)

```
dsijak\hook('alpha', function(){ print "hello alpha text 1!";}, 1);
dsijak\hook('alpha', function(){ print "hello alpha text 2!";}, 2);

```

#### Call keyword 'alpha':

[](#call-keyword-alpha)

```
dsijak\hook('alpha');

```

#### Get number of 'hooks':

[](#get-number-of-hooks)

```
dsijak\hook();

```

### Licence

[](#licence)

MIT

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

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

1525d ago

### Community

Maintainers

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

---

Tags

hookphp

### Embed Badge

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

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

###  Alternatives

[garetjax/phpbrowscap

Standalone replacement for php's native get\_browser() function

437862.4k5](/packages/garetjax-phpbrowscap)[workerman/crontab

A crontab written in PHP based on workerman

70164.2k58](/packages/workerman-crontab)[fof/nightmode

Add a Night Mode option for your users to use on your Flarum forum

3774.5k2](/packages/fof-nightmode)[mdixon18/fontawesome

A FontAwesome Nova field.

15196.6k](/packages/mdixon18-fontawesome)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

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