Go! 0.3.0 發布,為PHP應添加面向方面編程(AOP)支持

jopen 11年前發布 | 8K 次閱讀 Go

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).

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!