Go! 0.3.0 发布,为PHP应添加面向方面编程(AOP)支持

jopen 11年前

Go!是一个PHP 5.4类库,能够让开发人员为他们的PHP应用添加面向方面编程(AOP)支持。它不需要PECL扩展,Runkit,evals,或DI容器。The code with weaved aspects is fully readable and native, and can be easily debugged with XDebug. You can debug either classes or aspects. It can potentially be installed in every PHP application because you don't have to change the application source code at all. As an example, with the help of 10-20 lines of code it is possible to intercept all of the public, protected, and static methods in all classes of an application, and display the name and the arguments of each method during its execution。

发布日志: This release supports dynamic pointcuts, a pointcut which matches a specific point in the code, if it is under the control flow (look at AspectJ cflow and cflowbelow). It makes some performance optimizations (shared services and lazy loading). Pointcuts use case-sensitive matching and can be combined into the complex pointcut with the help of primitive pointcuts (&&, ||, !). There are changes in the kernel configuration (look at the demo for appLoader and autoloadPaths).