PHPackages                             gaoolp/aop - 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. gaoolp/aop

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

gaoolp/aop
==========

04PHP

Since Jun 2Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

### Aop插件使用教程

[](#aop插件使用教程)

> 同时支持直接new和从容器获取需要被切入的对象，也支持三方库的切入vendor目录下的类方法， 在不改变现有代码的情况下切入需要切入的前置后置方法，用在统计http请求，Rpc，组件链路追踪，日志记录，统计函数耗时 修改函数返回结果的应用场景

#### 安装

[](#安装)

```
composer require gaoolp/aop

```

1. 配置config\\plugin\\gaoolp\\aop\\aop.php文件
2. 自定义切入类需要实现gaoolp\\Aop\\AspectInterface接口并配置到以上aop配置文件中
3. 最后启动服务，并测试。

```
php start.php start
curl  http://127.0.0.1:8787
此时控制台打印前置和后置切面函数打印值
string(12) "beforeAdvice"
string(11) "afterAdvice"
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 62.5% 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.

### Community

Maintainers

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

---

Top Contributors

[![xioayangguang](https://avatars.githubusercontent.com/u/24973547?v=4)](https://github.com/xioayangguang "xioayangguang (5 commits)")[![gaoolp](https://avatars.githubusercontent.com/u/22535845?v=4)](https://github.com/gaoolp "gaoolp (3 commits)")

### Embed Badge

![Health badge](/badges/gaoolp-aop/health.svg)

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

###  Alternatives

[tlr/menu

Take some of the stress and boilerplate out of building menus (or indeed any list, because that's basically what a menu is) With support for laravel

189.6k](/packages/tlr-menu)[thanhnamcnv/laravel-make-repository-service

A simple package to create a make:repository, make:service command for Laravel 8+

273.3k](/packages/thanhnamcnv-laravel-make-repository-service)[darkflib/php-qrcode

QRCode library for PHP

1016.2k](/packages/darkflib-php-qrcode)

PHPackages © 2026

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