Download the PHP package next/aop without Composer

On this page you can find all versions of the php package next/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 aop

!!! 不能生产使用,仅作为研究用途

一款简单Aop实现。支持常驻内存型PHP应用。可以方便接入nextphp, Swoole,WebMan等框架。

环境要求

安装

使用,以下以webman为例

修改start.php文件

编写切面类,实现AspectInterface接口

修改方法添加切面注解

注意上面添加了两个注解,属性和方法注解的作用分别为注入属性和切入方法,可以直接在控制器中打印属性$request发现已经被注入了,切面注解可以有多个,会按照顺序执行。具体实现可以参考这两个类,注意这里的Inject注解并不是从webman容器中获取实例,所以使用的话需要重新定义Inject以保证单例

你也可以使用AspectConfig注解类配置要切入的类,例如上面的切面类

那么BaconQrCode\Writer类的writeFile方法将会被切入,该注解可以传递第三个参数数组,作为该切面构造函数的参数

启动

打开浏览器打开对应页面

控制台输出内容为


All versions of aop with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
next/utils Version ^0.1
next/di Version ^0.1
nikic/php-parser Version ^5.1
symfony/finder Version ^7.1
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 next/aop contains the following files

Loading the files please wait ....