PHPackages                             kampernet/aspects - 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. kampernet/aspects

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

kampernet/aspects
=================

Implements Aspect Oriented Programming in a very basic way

06PHP

Since Jun 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/kampernet/aspects)[ Packagist](https://packagist.org/packages/kampernet/aspects)[ RSS](/packages/kampernet-aspects/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Kampernet Aspects
-----------------

[](#kampernet-aspects)

This package provides a very simple way to get aspect oriented programming capabilities in your PHP classes with little overhead. Please see the code in tests/AspectTest.php to see how to use it.

```
    $aspectee = Aspect::getAspectedInstance('Aspectee');
    $aspectee->doThisThing();

```

You can easily hijack or create a PHP class autoloader that implements AOP this way. Using this Aspect class you make classes that are Aspectees and use the @has annotation to say what Aspects they have. The naming convention is such that it looks for the class you say it has plus the word Aspect.

eg: @has Example looks for and loads a class by the name of ExampleAspect.

The Aspect class methods are either named (before|after)&lt;Classname&gt;&lt;MethodName&gt; or have the @match annotation in the same format to get applied correctly. Using the @match annotation you can also match to regular expressions.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/kampernet-aspects/health.svg)

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

PHPackages © 2026

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