Download the PHP package x2nx/webman-aop without Composer

On this page you can find all versions of the php package x2nx/webman-aop. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webman-aop

基于 Webman 框架实现的高性能、高可用的 AOP (面向切面编程) 插件。

特性

安装

通过 Composer 安装:

配置

配置文件:config/plugin/x2nx/webman-aop/app.php

使用方式

方法级别切面

类级别切面

多个切面(按优先级)

创建自定义切面

方式一:实现 AspectInterface 接口

方式二:继承 AbstractAspect 基类(推荐)

AOP 通知类型说明

Before(前置通知)

在目标方法执行之前执行,可以:

After(后置通知)

在目标方法执行之后执行(无论是否抛出异常),可以:

Around(环绕通知)

可以完全控制目标方法的执行,可以:

AfterReturning(返回后通知)

在目标方法正常返回后执行(不抛出异常时),可以:

AfterThrowing(异常后通知)

在目标方法抛出异常后执行,可以:

通知执行顺序

当多个切面应用到同一个方法时,执行顺序如下:

  1. 所有切面的 Before 通知(按优先级顺序)
  2. 所有切面的 Around 通知(按优先级顺序,形成链式调用)
  3. 目标方法执行
  4. 所有切面的 AfterReturning 通知(如果正常返回)
  5. 所有切面的 AfterThrowing 通知(如果抛出异常)
  6. 所有切面的 After 通知(无论是否抛出异常)

JoinPoint API

完整示例

缓存切面

事务切面

许可证

MIT


All versions of webman-aop with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
workerman/webman-framework Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package x2nx/webman-aop contains the following files

Loading the files please wait ...