Git Product home page Git Product logo

function-proxy's Introduction

说明

类 Java JDK 的动态代理,有拦截器、自动注入、注入工厂等功能

  • 拦截器: AOP,调用被代理类的方法时,可提供一个拦截器,自定义方法被调用前、调用后的操作内容
  • 自动注入: 类属性类型如果被定义了,就自动把该属性注入
  • 注入工厂: 使用 PHP 8 Attribute 功能,在类属性声明上方指定创建该属性的工厂,可自定义属性的具体类。类似 Spring 中的 FactoryBean

调用 demo 在 test/Test.php

运行测试脚本

composer dump-autoload

php test/Test.php

function-proxy's People

Contributors

minororange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

function-proxy's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.