Download the PHP package dongnan/microaop without Composer

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

microAOP - 简洁而强大的AOP库

microAOP 是一个PHP编写的简洁而强大的AOP库,除去空行和注释,有效代码300多行,却实现了很多有用的特性,让PHP也能简单的实现AOP编程。如果你想在已有的项目中使用AOP编程,通过microAOP将会变得非常轻松,你只需要增加你所有需要的切面类,在原有代码改动最少的情况下就可以轻松实现AOP。

安装

microAOP 可以通过 composer 安装,安装步骤非常简单:

  1. 通过 composer 下载 microAOP
  2. 创建一个 model 类
  3. 创建一个切面类
  4. 绑定切面类到 model 的实例

第1步: 通过 composer 下载 microAOP

使用以下命令从 composer 下载 microAOP:

Composer 会将 microAOP 安装到你的项目中,安装路径: vendor/dongnan/microaop

第2步: 创建一个 model 类

第3步: 创建一个切面类

第4步: 绑定切面类到 model 的实例

执行后输出:

特性

  1. 绑定切面类非常简单,只需要一行代码
  2. 一个对象可以同时绑定多个切面类
  3. 支持绑定函数,支持所有callable类型
  4. 一个对象可以同时绑定多个函数(callable)
  5. 绑定函数的触发规则为方法名,也可以是匹配方法名的规则,支持正则表达式
  6. 按绑定顺序执行已绑定的切面类中方法和已绑定的函数(callable),但函数始终在切面类之后执行
  7. 触发位置包括执行方法的之前(before)、之后(after)、有异常时(exception)和总是执行(always)
  8. 触发执行的切面类方法或函数(callable)都有一个参数,参数是一个数组,包含被代理类类名(class)、被调用方法名(method)、被调用方法的所有参数集合(args)、被调用方法的返回值(return)(正常执行时)和被调用方法的异常信息(exception)(有异常时)
  9. 已绑定的切面类和函数(callable)可以随时移除绑定
  10. 支持钩子方法(v0.3.0新增)

例子

请参考项目中 examples 目录的内容


All versions of microaop with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 dongnan/microaop contains the following files

Loading the files please wait ....